473,725 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Virtual file system mapped to an explorer drive

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
4 8942
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
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
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.Direc tory.Create("ne w_directory") to create it
first

--
Bits.Bytes
http://bytes.thinkersroom.com
Jan 6 '07 #4
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.Direc tory.Create("ne w_directory") to create it
first

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2061
by: Eje | last post by:
I have a webapplication on a server. One function is to build txt-files. These files should then be moved to a fixed directory on another computer in the company network. I have tried to use System.IO.File.Move but get the message "Could not find a part of the path". The path to the receiving directory is mapped. I get the same message independant of receiving computer
11
3069
by: Andre | last post by:
Hi, I have ASP.NET application running on standalone (not part of the domain) Windows 2003. I use forms authentication for my application. The problem I have is that I need to create and read files on Windows domain network shared drives and also on shared via Samba Unix drives, which is equivalent to writing/reading to the workgroup computer. Please point, if possible, to detailed step by step description of what needs to be done. Thank...
8
9757
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my problem: my vb.net program has problems with UNC. If the UNC server is restarted or goes off-line, my VB.net program crashes. The code for UNC access to the file is included below and is put in the tick event of a form timer control running every...
2
4750
by: createdbyx | last post by:
I am trying to make a file sync utillity to sync files between my laptop and my desktop pc. On my desktop machine (xp pro sp2) I have shared my "Visual Studio Projects" folder using windows simple file sharing. And have specified the "Allow network users to change my files." option as well. Then on my laptop (xp home sp2) I have mapped a network drive using windows explorer. So on my laptop I have a Y: drive that points to the "Visual...
23
5377
by: wylbur37 | last post by:
I'm running an Apache server on my own computer (Windows XP Pro). I wrote a simple PHP script (called test3.php) that I'm running by putting the following URL in the address bar of the browser (Firefox) .... http://localhost/test3.php The script generates the following link using the echo statement ...
1
2230
by: Dave | last post by:
Hello all, I have an application that is accessing files from a mapped drive. I have full access to the share that is mapped and from explorer can delete files as I need. My application needs to be able to delete files once the are processed, but using File.Delete does not seem to be deleting them. What is the correct way of deleting files from a network drive in Windows.Form application?
2
8200
by: Kavitha | last post by:
Hi , Can any one tel me how to create a virtual drive in C#( similar to Gmail Virtual drive).Also tell me what interfaces could be used to create the same. Thanks in Advance Kavitha
2
2380
by: Gerhard | last post by:
I have a .net application that I want to run in a DMZ, with the SQL Server and file system behind another firewall. Is there a secure way to get to files from my application, or would it be better to have a reverse proxy server in the DMZ and the webserver behind the second firewall?
4
9154
by: Luc The Perverse | last post by:
Hi - I have very little C# programming experience. I am making a software product which calls for an interface almost identical to Windows Explorer - and I wondered if mounting a "virtual drive" would be feasable for me (someone not good at programming) to implement. -- LTP :)
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9179
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9116
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3228
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.