program arrtibutes;
uses
process;
procedure getattributes(filename:ansistring);
var
s,chr,g:ansistring;
i:integer;
begin
(RunCommand('attrib '+ filename,s));
write(s);
if s[1]='F' then exit;
for i:=1 to 20 do
begin
chr:=s[i];
case chr of
'A':writeln('archive');
'C':writeln('compressed');
'H':writeln('hidden');
'I':writeln('not content indexed');
'O':writeln('offline');
'P':writeln('pinned (Windows 10 and OneDrive only)');
'R':writeln('readonly');
'S':writeln('system');
'T':writeln('temperory');
'U':writeln('unpinned (Windows 10 and OneDrive only)');
'V':writeln('integrity (Windows Server 2012R2+ ReFS only0');
'X':writeln('no_scrub_data (Windows Server 2012R2+ ReFS only)');
end
end;
writeln('----------------');
end;
begin
getattributes('C:\Windows\notepad.exe');
getattributes('C:\Windows\system32\attrib.exe');
getattributes('C:\pagefile.sys');
getattributes('C:\hiberfil.sys');
getattributes('C:\swapfile.sys');
getattributes('Nonesuch.txt');
writeln('Press return to finish . . .');
readln;
end.