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

  1. {$N-}    {kein numerischer Coprozessor}
  2. {$M 10000,1384,5360}
  3.  
  4. program setdir;
  5.  
  6.   uses
  7.     testfile,dos;
  8.  
  9.   var
  10.     f                                  : text;
  11.     str,s                              : string[255];
  12.     i                                  : integer;
  13.  
  14.   begin
  15.     {$I-}
  16.     i:=1;
  17.     repeat
  18.       if paramcount>0 then assign(f,paramstr(i))
  19.       else begin
  20.         s:=getenv('temp');
  21.         if s='' then assign(f,'c:\temp\dir.txt')
  22.         else assign(f,s+'\dir.txt')
  23.       end;
  24.       RESET(F);
  25.       IF IORESULT=0 THEN while not eof(f) do begin
  26.         readln(f,str);
  27.         chdir(str);
  28.         if ioresult<>0 then writeln('Directory ',str,' existiert nicht!');
  29.       end;
  30.       inc(i);
  31.     until i>paramcount;
  32.    {$I+}
  33.   end.
  34.