Click here to Skip to main content
15,884,885 members
Articles / Programming Languages / C#
Article

Touch For .NET

Rate me:
Please Sign up or sign in to vote.
2.33/5 (3 votes)
16 May 2005 34.3K   195   12   2
Implementation of a simple Touch style command for .NET.

Sample screenshot

Introduction

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"

MONO example:

[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.

History

  • Version 1.0 - 5/14/2005

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralImage Link is invalid Pin
Josh Blair17-May-05 7:30
Josh Blair17-May-05 7:30 
GeneralRe: Image Link is invalid Pin
Rob Gallo17-May-05 7:47
Rob Gallo17-May-05 7:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.