Solved

Change Modified Date on thousands of Files in Windows by 1 hour

Posted on 2014-03-13
3
356 Views
Last Modified: 2014-03-31
The time date stamp on my backup drive is wrong by 1 hour.  I want to subtract 1 hour from the stamp on over 10,000 files.

I found BulkFileChanger @ nirsoft.net, but this is too many files for it.

What is the best way to get this done. A batch file or powershell command line script would be perfect. I'll take any solution that works.

Thank you!
0
Comment
Question by:JohnMan777
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
Dan Craciun earned 500 total points
ID: 39928497
gci "X:\your\path" | % {$_.LastWriteTime = $_.LastWriteTime.addHours(-1)}

Open in new window

or, if you want to modify the creation time:
gci "X:\your\path" | % {$_.CreationTime = $_.CreationTime.addHours(-1)}

Open in new window

HTH,
Dan
0
 

Author Closing Comment

by:JohnMan777
ID: 39967631
Dan,

I apologize for the slow response on this.

Although I was not able to verify that the solution works, it looks very promising.

I found some free utilities that did get the job done. They are "Bulk File Changer" and "fsTouch".

Thank you again for your help resolving this issue.

Thank you,

John Caspary
0
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39967647
I did test it and it works, but only for the current folder :)
I forgot to add the "-recurse" parameter.

The working solution would be:
gci "X:\your\path" -recurse | % {$_.LastWriteTime = $_.LastWriteTime.addHours(-1)}

Open in new window


Don't know how well this scales on thousands of files, though.

Best of luck!
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Synchronize a new Active Directory domain with an existing Office 365 tenant
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question