Rohit Sharma

Rohit Sharma

  • NA
  • 100
  • 44.6k

How to save a file into external hard disk

Feb 1 2013 12:26 AM
Hello friend

I need to save a file(video file) in a external hard disk through asp.net web application.
the condition is that every time i saved a video in a folder where the project is save.for that reason i dont have space in my local hard disk.
so for this reason i want to save external hard disk.
the most important part is that if external hard disk fill then again i use another external hard disk again and again.
now if i want to search a video then i must want to know i which external hard disk i have this video.
so i search case it automatically detected this extrn.hard disk when i insert one by one.

i means to say 

We all know how to save a text file like so:         

TextBox1.SaveFile(@"C:\hello.txt", RichTextBoxStreamType.PlainText);

 

But I need to save it to an external drive. So I would try:

            TextBox1.SaveFile(@"F:\hello.txt", RichTextBoxStreamType.PlainText);

 

BUT, F: can change to G: or E:, etc...  F: usually has a name such as 'MicroSD Card', though. 

 

So how do I save to the Removable Disk 'MicroSD Card' based on it's name?