I made this code where it copies a file on my computer to the USB attached to the before mention computer. Here is my code:
FileInfo file = new FileInfo(all_path);
file.CopyTo(@"E:\tst\test\testing");
When I try using this on a another computer, it does not work because on that computer the USB is a f:\ drive and on my computer it is a E:\ drive. So how do I make it that the code works on every computer. I hope someone can help me
If your application is running from the stick get your path like described here:
other option is to check the name of you device. Use the code described here: