03-12-2020 10:34 PM
The subject says it all, but for those interested in the backstory:
My application interfaces with a high speed digitizer. Each triggered acquisition is written to disk. The application was developed many years ago considering FAT32 limitations, namely if all files were allowed to be written to the same directory there was high risk of hitting the limit on the maximum number of files in a directory, and so the application separated files a few layers down in subdirectories. Nowadays with NTFS this isn't a problem, however the old approach is still used, and users are complaining about the pain of copying files our of the subdirectory structure.
Knowing that some hard disks are still formatted in FAT32 to this day, I want to be able to programmatically determine what file system is being used by the storage I'm writing to. If NTFS I'll switch to a much simple subdirectory structure.
Thanks!
Solved! Go to Solution.
03-13-2020 01:48 AM
03-13-2020 05:08 AM
Thanks for the reply, GerdW.
I tried that an unfortunately, at least on our systems, I could only get that command to work when running command prompt as administrator, yet most computer users won't have administrator privileges so when they're running the application it won't work.
I'll trying searching for the alternative solutions you suggest.
03-13-2020 05:47 AM
You can use GetVolumeInformationA, as recommended here: how-to-know-a-certain-disks-formatis-fat32-or-ntfs.
This returns NTFS for my system...
Attached VI is in LV13.
03-13-2020 05:56 AM
Works for me too. Many thanks, wiebe@CARYA.
03-13-2020 06:28 AM
You can try this VI. It uses the GetVolumeInformation Windows API and if you want to know more detailed specifics about the different returned parameters you can look for the documentation of GetVolumeInformationA on MSDN.