09-10-2008 09:37 AM
Hi All,
I have a question about file paths... I'm building an instrument and have a spare USB port internally. I want to use that to attach a simple flash drive to give the system on-board storage. The system itself is run by a separate PC to which it connects via a USB interface (there's a USB hub internal to the system, hence the spare USB port).
I've been able to format the USB flash drive and give it a label which shows up when the device is plugged into any computer. However, the drive letter associated with the device will vary from PC to PC since each PC may have a different number of drives already installed when I plug my system in. Is there a way to use my label to either address the flash drive directly, or at least to determine its drive letter within labview?
Thanks for your help
Paul Morris
09-10-2008 10:48 AM
09-10-2008 11:09 AM
Thanks for the reply.
I don't suppose you could give me a little more detail on how to actually make this work within labview? Its a tad advanced for me! A simple example where I can enter a volume label and get the resulting drive letter would be most appreciated...
Thanks again!
Paul
09-10-2008 01:35 PM
Attached are examples to do it using the batch file (note that I added the line echo %DRV% to the batch file) and .NET.
09-11-2008 03:00 AM
Sorry to be a continued pain... I don't suppose you could save those back to labview 8.0 could you?
thanks again for your help!
Paul
09-11-2008 07:09 AM
Here they are in LV8.0
09-11-2008 07:44 AM
Thanks very much for the help and VIs. Apart from obviously needing to have the .bat file in the right place to use that method, is there any reason why I should chose one method over the other?
Is one method inherently better than the other?
Thanks again for your help
Paul
09-11-2008 08:41 AM
09-11-2008 08:49 AM
Thanks again for the help. I'll stick with the .bat file for distributable code - its not a problem to include the .bat file with the code, I suspect one could even use labview to create the .bat file if it's not found on the system?
Although I may use the .net version for in-house only stuff, since I know we have .net installed on the machines here.
Thanks again.
Kind regards
Paul Morris