1 2 unit Unit1; 3 4 interface 5 6 uses 7 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 8 Dialogs,ComObj, StdCtrls; 9 10 type 11 TForm1 = class(TForm) 12 Button1: TButton; 13 procedure Button1Click(Sender: TObject); 14 private 15 { Private declarations } 16 public 17 { Public declarations } 18 end; 19 20 var 21 Form1: TForm1; 22 23 implementation 24 25 {$R *.dfm} 26 27 function IsNTFS(AFileName: string): Boolean; 28 var 29 fs, oleFile: OleVariant; 30 begin 31 fs := CreateOleObject('Scripting.FileSystemObject'); 32 oleFile := fs.GetDrive(fs.GetDriveName(AFileName)); 33 result := oleFile.FileSystem = 'NTFS' 34 end; 35 36 procedure TForm1.Button1Click(Sender: TObject); 37 begin 38 if IsNTFS('c:\WinNT\notepad.exe') then 39 ShowMessage('File is on NTFS File System') 40 else 41 ShowMessage('File is not on NTFS File System') 42 end; 43 44 end.