[jcifs] Creating file with hash ('#') in filename

Michael B. Allen miallen at eskimo.com
Tue Jan 14 04:43:26 EST 2003

On Mon, 13 Jan 2003 09:06:49 -0800
Thomas Krammer <TKrammer at nxn-software.com> wrote:

> Hi everyone,
> I'm trying to create a file with a hash mark ('#') in the filename on a SMB
> server. This works fine using the Windows Explorer but fails when I try it
> using jCIFS 0.7.0.
> When I'm using the SMB URL "smb://server/share/test#1.txt" a file named
> "test" is created because the "#1.txt" is interpreted as the fragment part
> of the URL.
> When I URL encode the hash mark ("smb://server/share/test%231.txt") a file
> named "test%231.txt" gets created.
> Looking at the "SMB Filesharing URL Scheme" document I didn't find any
> information how to encode the path component of the SMB URL.
> Did I miss something or is it simply not possible? 

No. It's currently not possible to reference such a file. I've known
about this for a while but I have not quite come up with a solution.

Actually this is your area Chris. What does the latest draft way :~)

A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and, more important, to tasks that have not
yet been conceived. 

More information about the jcifs mailing list