# [jcifs] mapping a network drive

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Mon Sep 3 12:41:05 EST 2001

PS: You can also do System.getRuntime.exec("net use L \\\\server\\share\\path\\to\\file") but that's sketchy.

> -----Original Message-----
> From:	Allen, Michael B (RSCH) [SMTP:Michael_B_Allen at ml.com]
> Sent:	Sunday, September 02, 2001 10:29 PM
> To:	'Forrest Samuels'
> Cc:	'jcifs at samba.org'
> Subject:	RE: [jcifs] mapping a network drive
>
> If you simply want to access a file you can use jCIFS but it doesn't used
> "drive letters". If you are commited to Windows you can use a UNC path
> with the plain java.io.File class like new
> File("\\server\share\path\to\file.doc"). If you wan't drive letters for some
> reason you must have the user "Map Network Drive" before running the
> program. I don't know of a Java program that can Map Network Drive
> automatically but it would not be hard to write some c to do it. You only
> need jCIFS if you wan't your program to be portable or if you need to
> access special low level NetBIOS/CIFS/SMB functionality.
>
> Mike
>
> > -----Original Message-----
> > From:	Forrest Samuels [SMTP:fsamuels at yahoo.com]
> > Sent:	Sunday, September 02, 2001 10:21 PM
> > To:	jcifs at lists.samba.org
> > Subject:	[jcifs] mapping a network drive
> >
> > I am working on a way to access shares on other
> > systems on a windows platform and I need a file based
> > on a drive. I am looking for a way to map the share so
> > I can access it by drive letter. Is there anyway to do
> > this with jcifs?
> >
> > -Forrest
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
> > http://im.yahoo.com
> >
>
>