home *** CD-ROM | disk | FTP | other *** search
/ TopWare Tools / TOOLS.iso / tools / top1318 / gepackt.exe / BATUTIL / SOURCE / GETDIR.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-12-19  |  634 b   |  34 lines

  1. {$N-}    {kein numerischer Coprozessor}
  2. {$M 10000,1384,5360}
  3.  
  4. uses
  5.   testfile,dos,fdisks;
  6.  
  7. var
  8.   f : text;
  9.   str,s : string[255];
  10.   b : byte;
  11.  
  12. begin
  13.   if paramcount>0 then assign(f,paramstr(1))
  14.   else begin
  15.     s:=getenv('temp');
  16.     if s='' then assign(f,'c:\temp\dir.txt')
  17.     else assign(f,s+'\dir.txt')
  18.   end;
  19.   {$i-}
  20.   rewrite(f);
  21.   {$i+}
  22.   if ioresult<>0 then begin
  23.     writeln('Datei konnte nicht angelegt werden!');
  24.     halt(1);
  25.   end;
  26.   for b:=1 to lastdisk do begin
  27.     getdir(ord(disks[b])-ord(pred('A')),str);
  28.     writeln(f,str);
  29.   end;
  30.   getdir(0,str);
  31.   writeln(f,str);
  32.   close(f);
  33. end.
  34.