Chinh Do

Touching a File with PowerShell

First time here? Check out my greatest hits or look around in the archives, and consider subscribing to the latest posts via RSS or email. Thanks for visiting.
25th June 2008

Touching a File with PowerShell

I am finding more and more things I can do with PowerShell everyday. The other day, I had to “touch” a file… one line is what it takes:

(ls testFile.txt).LastWriteTime = New-object DateTime 1991,12,31

posted in PowerShell, Programming | 0 Comments