AndersW
15 years agoOccasional Contributor
Need to find Label or Serial for removable drive(s)
TC version: 7.52
Script language: Delphi
I am currently making some tests for accessing a removable drive to read a file on it.
Problem is, that I can't be certain that the drive always gets the same drive letter.
So I need to find a unique identifier for it. This could either be the Label for the drive, or the serial. I had a look into the aqFileSystems.Drives property, I can see that it is possible to find a drive's serial. I used the following call:
drv := aqFileSystem.Drives(0).SerialNumber;
But all I get in return is 'Unknown'. If I Inspect the object aqFileSystem.Drives(0), I can see that serial contains a value.
If I use aqFileSystem.Drives(0).DriveLetter, then I get the value shown for that property.
How do I extract the Serial value?? ... or is it at all possible to find the drive's label instead??
Any help would be appreciated.
Script language: Delphi
I am currently making some tests for accessing a removable drive to read a file on it.
Problem is, that I can't be certain that the drive always gets the same drive letter.
So I need to find a unique identifier for it. This could either be the Label for the drive, or the serial. I had a look into the aqFileSystems.Drives property, I can see that it is possible to find a drive's serial. I used the following call:
drv := aqFileSystem.Drives(0).SerialNumber;
But all I get in return is 'Unknown'. If I Inspect the object aqFileSystem.Drives(0), I can see that serial contains a value.
If I use aqFileSystem.Drives(0).DriveLetter, then I get the value shown for that property.
How do I extract the Serial value?? ... or is it at all possible to find the drive's label instead??
Any help would be appreciated.