home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 341.img / TCS161S.ZIP / DIRHAND.PAS < prev    next >
Pascal/Delphi Source File  |  1980-01-01  |  974b  |  33 lines

  1.   procedure directory;
  2.   var r:registers;
  3.       ffinfo:searchrec;
  4.       tpath:anystr;
  5.       b:byte;
  6.       cnt:integer;
  7.   begin
  8.     { getdir (defaultdrive,tpath); }
  9.     tpath:=area.xmodemdir;
  10.     if tpath[length(tpath)]<>'\' then tpath:=tpath+'\';
  11.     tpath:=tpath+'*.*';
  12.     writestr ('Path/Wildcard [CR/'+tpath+']:');
  13.     writeln (^M);
  14.     if length(input)<>0 then tpath:=input;
  15.     writelog (16,10,tpath);
  16.     findfirst (chr(defaultdrive+64)+':\*.*',8,ffinfo);
  17.     if doserror<>0
  18.       then writeln ('No volume label'^M)
  19.       else writeln ('Volume label: ',ffinfo.name,^M);
  20.     findfirst (tpath,$17,ffinfo);
  21.     if doserror<>0 then writeln ('No files found.') else begin
  22.       cnt:=0;
  23.       while doserror=0 do begin
  24.         cnt:=cnt+1;
  25.         if not break then displayfile (ffinfo);
  26.         findnext (ffinfo)
  27.       end;
  28.       writeln (^B^M'Total Files: ',cnt)
  29.     end;
  30.     write ('Free Disk Space: ');
  31.     writefreespace (tpath)
  32.   end;
  33.