BRONZE PARTNER:
BRONZE PARTNER:
Industry News:

| |
 |
 |
 |
| Powershell script to change the Last Modified Timestamp for all the files in a folder |
 |
|
|
By: Ying Li
Posted On: 4/4/2007
Here is a very cool script and you can change the last modified timestamp for all the files in a folder:
This article was Previously posted on Ying Li's Blog
$Now= Get-Date $TargetFolder = Get-ChildItem "C:\MyWorkPlace" foreach($file in $Targetfolder) { $file.LastWriteTime = $Now $Now = $now.Addminutes(5) } $TargetFolder
I can choose whatever the time I want and just change to $now = Get-Date "3/21/2007 2:00 PM ". This will make me looks busy in front of my boss if he cares. Or I could help some VIP users (of course, they need to buy me lunch first!)
|
 |
 |
 |
|
|