home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR3 / FFG155.ZIP / DEMO_BAT.ZIP / RUNTREE.BAT < prev    next >
DOS Batch File  |  1993-08-16  |  1KB  |  36 lines

  1. @echo off
  2. cls
  3. echo Here is a demonstration of FFG's ability to execute commands for each
  4. echo found file using the '/e' option.  In this demo FFG will search for the
  5. echo DOS program TREE.COM and execute it.  You will be prompted before the
  6. echo program is executed.
  7. echo.
  8. echo (Of course, this program is most likely in your DOS search path so you
  9. echo wouldn't need to use FFG to go find and execute it, but it is used to
  10. echo illustrate the option.)
  11. echo.
  12. echo Note the use of the /1 option to stop FFG after the first TREE.COM is found.
  13. echo.
  14. echo Press any key to begin searching...
  15. pause >nul
  16. echo on
  17. ffg *:tree.com /e /1
  18. @echo off
  19. echo Done.  Press any key for next demonstration...
  20. pause>nul
  21. cls
  22. echo Note that the last demonstration of running the TREE program attempted to
  23. echo show the tree starting from the DOS directory.  It would be more useful to
  24. echo to show it from the root directory.  We can do this with FFG by specifying
  25. echo the command line with the /e option switch.  Here's how:
  26. echo.
  27. echo Press any key to begin searching...
  28. pause >nul
  29. echo on
  30. ::  Note that double %%'s are required because the DOS batch file interpreter
  31. ::  removes one of them.
  32. ffg *:tree.com /e%%N%%_\ /1
  33. @echo off
  34. echo Done.  Press any key for next demonstration...
  35. pause>nul
  36.