This code handles some of the problems that I have encountered with other Windows Touch style utilities such as lack of support for wildcards and full directory recursion.
Using the code
Using the code is simple, just run the options you want from the command line.
Example: Update all .js
files in a web folder, by setting their create and modify date to the current system date time.
c:\>touchfornet d:\inetpub\wwwroot\scripts\*.js /f /g
Example: Update the create and modify date on a directory to a previous day.
c:\>touchfornet D:\myDir /d /f /t"05/10/2005 2:15pm"
Example: Update MP3 files to share the same create date time, good for archiving.
C:\>touchfornet D:\MP3\*.mp3 /f /g /r /t"05/01/2005"
[rob@linuxBox]$ mono touchfornet.exe /MP3/*.mp3 /f /g /r /t"05/01/2005"
Points of Interest
This code shows a simple implementation of recursive programming for working with directories.