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

  1. @echo off
  2. cls
  3. echo Here we create a 0-byte file with today's date as its name which could be
  4. echo used by other programs to check today's date.
  5. echo.
  6. echo Press any key to begin...
  7. pause>nul
  8. ::-----------------------------------------------------------------------
  9. ::
  10. :: Note that double '%%' are used with /e option because we are doing this in
  11. :: a batch file:
  12. ::
  13. ::echo on
  14. rem>$$$$$$$$.&&&
  15. ffg .\$$$$$$$$.&&& /r /q /1 /dt "/e!ren %%n %%d.tdy"
  16. ::-----------------------------------------------------------------------
  17. echo.
  18. echo Press a key to see the file...
  19. pause>nul
  20. echo.
  21. echo The file has today's date as the first name and TDY as the extension:
  22. echo.
  23. ffg .\*.tdy /r /qf /dt
  24. ::-----------------------------------------------------------------------
  25. echo.
  26. echo Next you will be given a chance to delete the file.  Press any key...
  27. pause>nul
  28. echo.
  29. ffg .\?[,?]-?[,?]-??.tdy /r /q /dt "/edel %%N"
  30. ::-----------------------------------------------------------------------
  31. cls
  32. echo Done.  Press any key for next demonstration...
  33. pause>nul
  34. :: Since this is a demo the file will be deleted
  35. ffg .\*.tdy /r /q /dt "/e!del %%N
  36.