...entdecken, ob sich eine Datei auf einem NTFS Laufwerk befindet?
Autor: Serhiy Perevoznyk
uses
ComObj;
function IsNTFS(AFileName: string): Boolean;
var
fso, drv: OleVariant;
begin
IsNTFS := False;
fso := CreateOleObject('Scripting.FileSystemObject');
drv := fso.GetDrive(fso.GetDriveName(AFileName));
IsNTFS := drv.FileSystem = 'NTFS'
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if IsNTFS('X:\Temp\File.doc') then
ShowMessage('File is on NTFS File System')
else
ShowMessage('File is not on NTFS File System')
end;
printed from
www.swissdelphicenter.ch
developers knowledge base