Quantcast
Channel: How to copy files from one folder to another that has different hierarchy? - Super User
Viewing all articles
Browse latest Browse all 5

Answer by Mr Ethernet for How to copy files from one folder to another that has different hierarchy?

$
0
0

You can do this easily using Robocopy.

  1. Open a Command Prompt window
  2. Run the following command:

robocopy /e f:\files\fx\water\apx\build\setup f:\files\fx\water\microsoft\apx\build\setup

  • /e must be used in order to include any subfolders (or empty subfolders) that exist in your source folder. Without this switch, Robocopy will only copy files and will ignore subfolders. It's usually best to include it.
  • there is no need to add "." as Robocopy copies all files by default, so that would be redundant.

Update:

The OP has updated his question to include a requirement for source path folder wildcarding.

Source path folder wildcarding isn't supported in Robocopy, as the only wildcards it supports are those used either in file names or file extensions.

As a result of this limitation, Robocopy cannot help the OP here. An answer using an alternative scripting solution is required.


Viewing all articles
Browse latest Browse all 5

Trending Articles