Where can I get the touch utility for Windows?
I have tried this one at CodeProject but it did not change directorys.
Where can I get the touch utility for Windows?
I have tried this one at CodeProject but it did not change directorys.
you can use powershell to do this as well. I have the following function in my $profile
function touch([string] $filename)
{
$curTime = Get-Date
$touchFile = get-item $filename
$touchFile.CreationTime = $curTime
$touchFile.LastAccessTime = $curTime
$touchFile.lastWriteTime = $curTime
}
There are several solutions at https://stackoverflow.com/questions/51435/windows-version-of-the-unix-touch-command
While most of them suggest getting Cygwin (my bias too) or some other unix utilities, there is one answer describing a windows method.
copy /b filename.ext +,,
Another simple solution from the same answer is to get the Cygwin.dll and touch.exe copied locally in your windows system. It will work better if you want to process directories recursively.