[jcifs] Re: SmbFile.delete

Michael B Allen mba2000 at ioplex.com
Tue Aug 16 04:07:55 GMT 2005

On Tue, 16 Aug 2005 01:28:01 +0000 (UTC)
Koji <seaslug at hotmail.co.jp> wrote:
> > Post the UNC path and corresponding SMB URL you are using that represents
> > the file to be deleted. I suspect your SMB URL is invalid.
> Thanks for your quick response.
> SMB URL is "smb://server.domain.co.jp/sharedfolder/home/koji/test/".
> Seems like UNC depends on command. In queryPath, UNC seems to be 
> "\server.domain.co.jp\SHAREDFOLDER\home\koji\test\test.txt". 
> In delete UNC seems to be "\home\koji\test\test.txt". 

I don't mean that UNC. I mean the Windows UNC path. I mean the path that
you need to type into Start > Run on a windows machine to get to the
target resource. Figure out what it is and verify that it works with
Windows. It should be something like:


If it doesn't work then maybe you have the wrong path?

When you do figure out what it is, flip the slashes around and add 'smb:'
to the beginning like:


Also, instead of testing with the delete command perhaps you should just
try the Exists.java example until you figure out what the URL really is.


More information about the jcifs mailing list