Welcome to Recursive Touch-Dot-Net !

Have you ever need to change the modification timestamp for a bunch of files? How can somebody do this? Well, there are many methods, but none of them helps enough!

In the next lines, I'll explain why. First of all let me introduce a method: Old, plain, touch.exe. This is the good old times tool to accombish a task like this. You execute touch giving the file name as a parameter, and, voila! Timestamp is changed.

But, what if you want to "touch" more than one files? And what if those files lay in a deep directory structure?

Well you have to use find. Do you know find? If you're coming from unix, you probably do. But how you use find in conjuction with touch? Take a look:

find <root_dir> -exec touch {} \;

Ok. Execute it and... Oops! an error! You have to leave a space between "\" and ";" so,

find <root_dir> -exec touch {} \ ;

Now, execute it again. Did it execute? Yes? Well you're lucky. Because it didn't find a long directory name with spaces in the name! Maybe you need to put the file names passed to touch, in double quotes. But how do you do it?

Hm.. Maybe you have to use sed? Do you know sed? No? Then forget it!

But we're not hopeless! We have the .NET framework. I wrote a program, which works just fine for this task, in a fraction of the time i'd need to read all the documentation for "find", "touch", "sed", "xargs", "more", etc. No, "etc" is not a program :-)

See more at project's page at sourceForge: http://sourceforge.net/projects/touch-dot-net

You can donate to this project here: http://sourceforge.net/donate/index.php?user_id=1353878

You can find more info about me here: http://www.papadimitriou.info