Copy (subset) of files preserving all date info

edited 27 April 2019 at 3:58PM in Techie Stuff
3 replies 408 views
KingLKingL Forumite
1.7K Posts
edited 27 April 2019 at 3:58PM in Techie Stuff
I have a folder with lots of child folders and files in.

I want to copy a specific subset of the files (and folder hierarchies) from one drive to another while RETAINING their File Created Date and File Modified Dates (for the dates of folders and files)

I painstakingly made a list of the path statements of the required (subset of) files, then used a spreadsheet to make the xcopy statements:
xcopy "f:\Sou rce3\File6.jpg" "g:\Tar get3\"
xcopy "f:\Sou rce7\File17.jpg" "g:\Ta rget7\"

But I find that running this in an (admin) CLI window preserves the Modified Date of the files, but not their Created Dates (nor any of the dates of their containing Folders).


I found some stuff about Robocopy preserving dates metadata. If I Robocopy the files onto a blank drive, the Created and Modified dates of the files are preserved, but not those of the folders (the folder's Created Date is today).

As a workaround, I tried first robocopying a set of empty folders
(syntax: ROBOCOPY source target /e /xf /copyall /dcopy:T * )
The result is that all the folder dates are preserved, however when I subsequently Robocopy the files over into those empty folders, the folders' Modified Dates get changed to today's date.

so I'm stuck.

How can I copy a designated list of files (NOT the entire folder), while preserving ALL the dates, please.

The drives are external drives. Win 10 home. There are actually tens of thousands of files in hundreds of nested folders. I am wanting to copy about 80% of them, which are defined in my list/spreadsheet. So I need something that doesn't need a lot of manual intervention (other than tweaking my spreadsheet to write different command statements).




This discussion has been closed.
Latest News and Guides