Score:0

How to copy with robocopy the time attributes without re-copying the files

us flag

I transferred the files to a new disk but found that files with the wrong year (1980) and these files I can't open with Photoshop.

I would like to copy the time attributes from the first drive to the second without re-copying files.

A large amount of data. Thanks.

Score:0
it flag

Rather than trying to use Robocopy to not copy, you can use Powershell to update the timestamps.

To update file or folder modified dates, in Windows, similar to Linux/Unix 'touch' utility, use Powershell's set-itemproperty cmdlet.

Your command would look something like this:

set-itemproperty -path $Yourfile -name lastwritetime -value "2021-05-18 10:17:47"

Use get-childitem cmdlet to walk the file tree (either one level or add -recurse option to descend the folder/file tree).

Your loop would look something like this:

$filelist = get-childitem C:\Users\You\* -recurse
foreach ($file in $filelist) {
      set-itemproperty -path $file -name lastwritetime -value "2021-05-18 10:17:47"
}

There are options associated with Get-ChildItem to grab only files or only folders. In Powershell window type Get-Help Get-ChildItem or Set-ItemProperty for more options.

Score:0
ck flag

You need to just copy the timestamps of the original files to the copied files (1980) without having to re-copy the original files again, actually, I didn't see this before using robocopy, but I think you have to robocopy it again with the /DCOPY:T switch . It can also preserve ACLs. Alternatively, SyncThing and Gs Richcopy360 can be configured to preserve directory timestamps and ACLs.

And after doing a full search, I found that Gs Richcopy360 has a feature called "Folder Time Stamp", this will re-correct the date on the destination, no need to re-copy the files, I think this will help.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.