Getting a drive name
I'm looking for a way to get the name of a DVD while it's in a drive. Up to now I'm able to get the drive info, with the aqdriveinfo() method, but no where in this object do we have the name of the DVD. I only have the drive letter, disk size, and other info.
Does anyone know how I could get the actual DVD name?
Re: Getting a drive name
Well I found a workaournd for this and thought I would post it so if anyone needs it they can use it.
First I added a tested app in TC, which is a batch file that I wrote.
The batch file contains the following:
diskpart /s %1 > %2
This Batch file takes the 2 parameters %1 and %2 which are respectively the path to a script sent do "diskpart" and the path to the output logfile
Next I created a script.txt passed to diskpart which contains the following:
The essentially lists all the volumes of the filesystem. This list is outputed to the log file specified earlier.
Then I use the "aqfile.readwholefile" in TC to load the file into a variable and then use the "find" method to make sure my DVD's name is in this string.
All in all it's a pretty complicated work around, but it works and like a charm. Hopefully one day TC will implement a feature to get a volume name.
If you have questions, just reply and I'll be back to answer as soon as I can.
P.S. Sorry for the lousy formatting.