home *** CD-ROM | disk | FTP | other *** search
- @echo off
- cls
- echo Here we create a 0-byte file with today's date as its name which could be
- echo used by other programs to check today's date.
- echo.
- echo Press any key to begin...
- pause>nul
- ::-----------------------------------------------------------------------
- ::
- :: Note that double '%%' are used with /e option because we are doing this in
- :: a batch file:
- ::
- ::echo on
- rem>$$$$$$$$.&&&
- ffg .\$$$$$$$$.&&& /r /q /1 /dt "/e!ren %%n %%d.tdy"
- ::-----------------------------------------------------------------------
- echo.
- echo Press a key to see the file...
- pause>nul
- echo.
- echo The file has today's date as the first name and TDY as the extension:
- echo.
- ffg .\*.tdy /r /qf /dt
- ::-----------------------------------------------------------------------
- echo.
- echo Next you will be given a chance to delete the file. Press any key...
- pause>nul
- echo.
- ffg .\?[,?]-?[,?]-??.tdy /r /q /dt "/edel %%N"
- ::-----------------------------------------------------------------------
- cls
- echo Done. Press any key for next demonstration...
- pause>nul
- :: Since this is a demo the file will be deleted
- ffg .\*.tdy /r /q /dt "/e!del %%N
-