Solved

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

Posted on 2014-03-13
3
359 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

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 35

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

623 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