Copy Files listed in a text file to an External Disk preserving the folder

I need time to time to export files listed in txt file with the full path to an External Drive preserving the folder structure. Sometimes are hundreds of files so i’m looking for an automation but i don’t know powershell.

If i need to export everything within a directory i can use Robocopy with the MIR option but most of the time i need only to copy some files from a directory…some from other…etc…

There is a way to read the file with powershell and for each line run a Robocopy to a destination folder?

You’ll have a few options in this recent thread:

As mentioned there - there is is no built in way to achieve what you’re asking for. You will have to “extract” the part of the path you want to preserve from the source file path and create that part of the path in the destination root before you can copy the file into this newly created folder.