Scenario
I need to reproduce good old touch hello.c using nothig else but standard Windows commands. How can I change the date of a file, but not its content, using nothing else but what is provided in a standard Windows XP Pro installation (CMD, FIND, SORT, etc.)?
Solution
Open CMD (Run As Administrator). This command will change a file's date and [gs timestamp] to current.
copy <<filename.extn>> /B+ ,,/Y
If you want to do a bulk change in a directory, for say, all .gif files, then:
for %i in ('dir *.gif') do copy %i /B+ ,,/Y
SOURCE | LINK | LANGUAGE | ENGLISH |
How do I “touch” a file with standard Windows commands? (Linux – Windows) – http://heelpbook.altervista.org/?p=35528 – HeelpBook – 17/01/2013 – 9:40 – Visit http://www.heelpbook.net OR http://mobile.heelpbook.net on your tablet! #HeelpBook @HeelpBook