code_junkie

How can I find out the file system being used in Windows Preferably in code

Nov 14th, 2011
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. function string get_FileSystem( strPath )
  2. object objFSO, objDrive;
  3. begin
  4. set objFSO = CreateObject ( "Scripting.FileSystemObject" );
  5. if ( IsObject (objFSO) ) then
  6. try
  7. set objDrive = objFSO.GetDrive( objFSO.GetDriveName( strPath ) );
  8. if ( IsObject( objDrive ) ) then
  9. //Available return types include FAT, NTFS, FAT, FAT32, and CDFS
  10. return objDrive.FileSystem;
  11. endif;
  12. catch
  13. MessageBox( "Unable to determine File System.", INFORMATION );
  14. endcatch;
  15. endif;
  16. end;
  17.  
  18. Console.WriteLine(new DriveInfo(Environment.SystemDirectory).DriveFormat);
Add Comment
Please, Sign In to add comment