Paste only file attributes

fabcad

Commendable
Feb 13, 2017
3
0
1,510
0
Hi,
I'm looking for a way to change creation and modification file date, copying them from other files with same name and location (obviously in another folder).
I tried Robocopy (/copy:t) but it didn't work.
Do you have any suggestion?
Thank you!
 

fabcad

Commendable
Feb 13, 2017
3
0
1,510
0
Thanks for your answer. In this way I can manually change the date on a file, but I have to change the dates for more than a thousand files. I have two folders with same files in (filenames, at least), but different dates
 

Ralston18

Titan
Moderator
Then it gets more complicated.

You will need to have Powershell process all the files in a given folder

Get-ChildItem came to mind.

Here is a link that will lead you toward the necessary script.

https://www.opentechguides.com/how-to/article/powershell/128/change-file-timestamp.html

Use the information in the above link and your requirements to customize additional searches as necessary.

Be sure to test on copies of the applicable directories, folders, and files. Well away from the actual data.

Even when all appears well keep originals somewhere....

 

ASK THE COMMUNITY

TRENDING THREADS