home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Jason Aller Floppy Collection
/
341.img
/
TCS161S.ZIP
/
DIRHAND.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1980-01-01
|
974b
|
33 lines
procedure directory;
var r:registers;
ffinfo:searchrec;
tpath:anystr;
b:byte;
cnt:integer;
begin
{ getdir (defaultdrive,tpath); }
tpath:=area.xmodemdir;
if tpath[length(tpath)]<>'\' then tpath:=tpath+'\';
tpath:=tpath+'*.*';
writestr ('Path/Wildcard [CR/'+tpath+']:');
writeln (^M);
if length(input)<>0 then tpath:=input;
writelog (16,10,tpath);
findfirst (chr(defaultdrive+64)+':\*.*',8,ffinfo);
if doserror<>0
then writeln ('No volume label'^M)
else writeln ('Volume label: ',ffinfo.name,^M);
findfirst (tpath,$17,ffinfo);
if doserror<>0 then writeln ('No files found.') else begin
cnt:=0;
while doserror=0 do begin
cnt:=cnt+1;
if not break then displayfile (ffinfo);
findnext (ffinfo)
end;
writeln (^B^M'Total Files: ',cnt)
end;
write ('Free Disk Space: ');
writefreespace (tpath)
end;