Touch a File in Windows without a Touch Utility

One of those annoying omissions in Windows is the lack of a Touch utility to update the time stamp of a file. There are dozens of freeware programs available to do this but what if you’re updating something on a corporate system where you don’t have such a utility?

Your can do this from a plain old DOS command as follows:

copy /b Source+,,

where Source is the name of a file.

This updates the current time and date of the file without modifying it. Believe it or not, this is documented behavior! (Copy command)

← newer older →
.Net, Technology, Life, Whatever

Recent Posts

Quick Tip - Clear ReSharper's Cache to Fix False Errors
Quick Tip - Refined GitHub
Vertical Layout for HTML Tables
Visual Studio 2017 Installer Quick Tip
VSColorOutput for VS 2017 Released
Quick ReSharper tip for inline templates
NoSQL vs. NewSQL: What's the Difference?
More... (1077)

Donate with PayPal