home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / b / bak_zap.zip / ULTRADIR.BAT < prev    next >
DOS Batch File  |  1989-05-24  |  2KB  |  63 lines

  1. CLS
  2. if "%1" == "" GOTO HOWUSE
  3. for %%G in ( -Q -q ) do  if %1==%%G goto QUICKY
  4. for %%G in ( -S -s ) do  if %1==%%G goto SEARCHFOR
  5. for %%G in ( -V -v ) do  if %1==%%G goto SEARCHAGAINST
  6. REM what will we use find for? Remember, find has a -v option, to exclude
  7. REM instead of including matches.
  8. goto ULTRA
  9.  
  10. :HOWUSE
  11. ECHO OFF
  12. CLS
  13. ECHO MUST have CHKDSK from DOS in PATH to run.             Peter Berger 1989 v1.0
  14. ECHO ____________________________________________________________________________
  15. ECHO Use ALLPATHS when you want the computer to enter all directory names for you
  16. ECHO IE: To delete all *.bak files on your C drive, GO TO YOUR C: DRIVE
  17. ECHO and enter the following:
  18. ECHO ULTRADIR          del ALLPATHS\*.bak
  19. ECHO ____________________________________________________________________________
  20. ECHO SPEED OPTIONS: use -Q if you haven't done anything since the last ultradir.
  21. ECHO ULTRADIR -Q       del ALLPATHS\myfiles.*
  22. ECHO You cannot run the -Q option right after a run with -S.
  23. ECHO ____________________________________________________________________________
  24. ECHO SEARCH OPTION: use -S STRING if you only want to act on certain directories.
  25. ECHO The STRING is a series of characters that must occur in the pathname.
  26. ECHO YOU MUST TYPE USING ONLY UPPERCASE CAPITAL LETTERS!
  27. ECHO Ie., to delete all files in the arcade directory and all its subdirectories,
  28. ECHO 
  29. ECHO ULTRADIR -S ARCADE del ALLPATHS\*.*
  30. ECHO 
  31. ECHO Use -V STRING the same way as -S (above), except -V will EXCLUDE all the
  32. ECHO paths with the STRING you specify from the action you specified.
  33. ECHO Careful with -S and -V. Ie., in the last example, 
  34. ECHO any path with the letters ARCADE will get hit.
  35. ECHO ____________________________________________________________________________
  36. goto DONE
  37.  
  38. :SEARCHFOR
  39. REM Get rid of the -S:
  40. shift
  41. chkdsk /v | find "%1" > \disktree.txt
  42. REM Get rid of the "find" search argument:
  43. shift
  44. goto NEW
  45.  
  46. :SEARCHAGAINST
  47. shift
  48. chkdsk /v | find /v "%1" > \disktree.txt
  49. shift
  50. goto NEW
  51.  
  52. :ULTRA
  53. chkdsk /v > \disktree.txt
  54. goto NEW
  55.  
  56. :QUICKY
  57. shift
  58.  
  59. :NEW
  60. ultranew %1 %2 %3 %4 %5 %6 %7 %8 %9
  61. \disktree
  62.  
  63. :DONE