By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,146 Members | 1,820 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,146 IT Pros & Developers. It's quick & easy.

Virtual file system mapped to an explorer drive

P: n/a
I read in the
topic:(http://groups.google.com/group/micro...171cb6c66a79cc)
how to map a folder to a virtual drive, but how do I map a virtual
drive to my application in C#, which would handle file operations. Can
I do this in C#, and if so, how? Thanks.

Jan 6 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On 5 Jan 2007 20:14:23 -0800, CodeLeon wrote:
I read in the
topic:(http://groups.google.com/group/micro...171cb6c66a79cc)
how to map a folder to a virtual drive, but how do I map a virtual
drive to my application in C#, which would handle file operations. Can
I do this in C#, and if so, how? Thanks.
That sounds like quite the effoft ... Why don't you take a look at the
subst command ... this will map a path to virtual drive. You can shell to
the system using the process class to do the mapping and then subsequently
access your new drive
--
Bits.Bytes
http://bytes.thinkersroom.com
Jan 6 '07 #2

P: n/a
Thank you! I think that might work! Is there any way to monitor that
folder that the drive is mapped? Also, is there any way to map a drive
without the folder existing? Well, thanks in advance!

Rad [Visual C# MVP] wrote:
On 5 Jan 2007 20:14:23 -0800, CodeLeon wrote:
I read in the
topic:(http://groups.google.com/group/micro...171cb6c66a79cc)
how to map a folder to a virtual drive, but how do I map a virtual
drive to my application in C#, which would handle file operations. Can
I do this in C#, and if so, how? Thanks.

That sounds like quite the effoft ... Why don't you take a look at the
subst command ... this will map a path to virtual drive. You can shell to
the system using the process class to do the mapping and then subsequently
access your new drive
--
Bits.Bytes
http://bytes.thinkersroom.com
Jan 6 '07 #3

P: n/a
On 6 Jan 2007 09:26:31 -0800, CodeLeon wrote:
Thank you! I think that might work! Is there any way to monitor that
folder that the drive is mapped? Also, is there any way to map a drive
without the folder existing? Well, thanks in advance!
Hey Leon,

To find out which folder is mapped to which drive just run the subst
command without any parameters. It will list all the current subst drives
like so:

I:\: =C:\downloads

As for mapping folders that don't exist -- subst will throw an error for
that. However that shouldn't be a problem. Before you shell the command for
subst you can do a System.IO.Directory.Create("new_directory") to create it
first

--
Bits.Bytes
http://bytes.thinkersroom.com
Jan 6 '07 #4

P: n/a
Okay! Thanks for the advice! I think that'll work great.
Rad [Visual C# MVP] wrote:
On 6 Jan 2007 09:26:31 -0800, CodeLeon wrote:
Thank you! I think that might work! Is there any way to monitor that
folder that the drive is mapped? Also, is there any way to map a drive
without the folder existing? Well, thanks in advance!

Hey Leon,

To find out which folder is mapped to which drive just run the subst
command without any parameters. It will list all the current subst drives
like so:

I:\: =C:\downloads

As for mapping folders that don't exist -- subst will throw an error for
that. However that shouldn't be a problem. Before you shell the command for
subst you can do a System.IO.Directory.Create("new_directory") to create it
first

--
Bits.Bytes
http://bytes.thinkersroom.com
Jan 7 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.