Using the forfiles Windows command, I wnat to copy a directory and every subdirectory. To do so, I´ve tried this:
forfiles /S /P %myDirectoryPath% /C "CMD /C xcopy @path %NewPath% /Y /V /E"
But all files included in the subdirectories are copied in the same folder as the files of the main directory.
How can I solve it?
Thanks.
You should be able to use
xcopyto copy the directory treeAlternatively use
robocopy