home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR3 / FFG155.ZIP / DEMO_BAT.ZIP / FORMATS.BAT < prev    next >
DOS Batch File  |  1993-06-25  |  3KB  |  89 lines

  1. @echo off
  2. cls
  3. echo This batch file illustrates different output formats FFG provides.  A search
  4. echo for .COM, .BAT, and .EXE files is used as an example.
  5. echo.
  6. echo Because the list of files may be long for each search, you may want to
  7. echo press the ESCAPE key to interrupt the search and move on to the next
  8. echo example.
  9. echo.
  10. pause
  11. REM --------------------------------------------------------------------------
  12. cls
  13. echo This is the default output format:
  14. pause
  15. echo on
  16. ffg /p *.[com,exe,bat]
  17. @echo off
  18. echo.
  19. echo Note the use of the bracketed alternatives instead of *.com,*.exe,*.bat.
  20. echo.
  21. pause
  22. REM --------------------------------------------------------------------------
  23. cls
  24. echo Next is a search where only the summary is shown:
  25. pause
  26. echo on
  27. ffg *.[com,exe,bat] /fs.
  28. @echo off
  29. echo.
  30. pause
  31. REM --------------------------------------------------------------------------
  32. cls
  33. echo Next only the full file path will be shown.  This output can be
  34. echo redirected to a file, which is useful for creating an @FILE file for ZIPing
  35. echo groups of files.  Other programs besides ZIP also support @ files for input.
  36. echo Since this output would likely be redirected, output of the summary information
  37. echo is turned off.
  38. pause
  39. echo on
  40. ffg /p *.[com,exe,bat] /fp /fs!
  41. @echo off
  42. echo.
  43. pause
  44. REM --------------------------------------------------------------------------
  45. cls
  46. echo Next the output will be in a comma-delimited ASCII database format.  This
  47. echo is good for import into most databases.
  48. pause
  49. echo on
  50. ffg /p *.[com,exe,bat] /f, /fs!
  51. @echo off
  52. echo.
  53. pause
  54. REM --------------------------------------------------------------------------
  55. cls
  56. echo Next is the database format again, but now only selected information will
  57. echo be shown.  In this example we chose to capture the disk drive letter,
  58. echo directory path, and file name.  Attributes, date and time are not
  59. echo captured.
  60. pause
  61. echo on
  62. ffg /p *.[com,exe,bat] /f,:rn /fs!
  63. @echo off
  64. echo.
  65. pause
  66. REM --------------------------------------------------------------------------
  67. cls
  68. echo Next is "batch file" output format which is intended to be redirected to
  69. echo a batch file for subsequent processing of the files as a group.  In this
  70. echo case we want a batch file that has two replaceable parmeters before the
  71. echo found file and one more after it.  Later this batch file could be
  72. echo executed with the desired command and options.  For example, if the
  73. echo output were redirected to a file called DO-IT.BAT, the following command
  74. echo.
  75. echo        DO-IT XCOPY /V A:
  76. echo.
  77. echo would result in XCOPYing (with VERIFY) each file to the A: drive.
  78. echo.
  79. echo This is one of FFG's most powerful features.  It provies file grouping
  80. echo capabilities that you can not achieve with DOS alone.
  81. echo.
  82. pause
  83. echo on
  84. ffg /p *.[com,exe,bat] /fb1_2_p\n_3 /fs!
  85. @echo off
  86. echo.
  87. pause
  88. cls
  89.