We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
Has MSE helped you to save or reclaim money this year? Share your 2025 MoneySaving success stories!

Copy (subset) of files preserving all date info

KingL
KingL Posts: 1,713 Forumite
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.

background:
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).

thanks

.

Comments

This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 352.9K Banking & Borrowing
  • 253.9K Reduce Debt & Boost Income
  • 454.7K Spending & Discounts
  • 246K Work, Benefits & Business
  • 602.1K Mortgages, Homes & Bills
  • 177.8K Life & Family
  • 259.9K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.