Solved

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

Posted on 2014-03-13
3
353 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

759 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now