sop wyin

sop wyin

  • NA
  • 1
  • 0

Save file to drive based on drive name

Nov 28 2010 2:18 PM

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

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

 

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

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

 

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

 

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


Answers (1)