home *** CD-ROM | disk | FTP | other *** search
/ Media Depot 5 / mediadepotvolume51993.iso / FILES / 16 / JCCHDIR.ZIP / BATCH.ZIP / ALLBAK2.BAT < prev    next >
Encoding:
DOS Batch File  |  1996-06-30  |  548 b   |  27 lines

  1. @echo off
  2. IF %1.==-?. GOTO help
  3. IF %1.==/?. GOTO help
  4.  
  5. IF %p%.==. GOTO noPathSet
  6. :pathSet
  7.  echo %p%
  8.  IF NOT exist *.bak  GOTO e
  9.  :: ^test if there are any files *.bak in the current directory
  10.   echo %d%%p%  >>%1
  11.   :: ^ c.exe sets %d% to the drive, %p% to the path (without drive)
  12.   dir *.bak |find " BAK">>%1
  13.   echo.>>%1
  14.  GOTO e
  15.  
  16. :noPathSet
  17.  IF exist *.BAK  dir *.BAK >>%1
  18.  
  19. GOTO :e
  20. :help
  21.   echo.
  22.   echo This file is exlusively to be used by allbak.bat
  23.   echo Requires a dos-version where FIND sets errorlevels
  24.   echo.
  25.  
  26. :e
  27.