In need of a DOS .bat script to copy files recursively, retaining directory structure.
-User will drag a folder onto the .bat file to run it (operating on %1 basically)
-Please use xcopy, so that I can use an external exclusion file, using /EXCLUDE (I can add this, just need to make sure you use xcopy so I an add this option)
-Need to have it copy files recursively (i.e. sub-folders too), and keep the same directory structure.
-In addition to that, the directory structures need to stay the same between both source and destination
-IMPORTANT! : Although both the source directory structure and the destination directory structure will be known, the amount of directories and files are massive (1000's of them) so the point of this batch script, is to allow a user to drag a folder like this: C:\dirA\dir1\dir2\dir3\ onto the batch file and have it copy all sub-folders and files to here: X:\totallydifferentrootdir\anotherdiffdir\dir1\dir2\dir3\ <-- see how they both have a common structure above ALL THE WAY to \dir1? But also notice that they DO have a different root structure above \dir1???. I need to have the complete source and dest structure stay in sync, because this tool will mostly be updating files from one area and putting them in their same spot into a different area. The difference being the root folders are different (above a certain point, which is ok because I will know what these are).
The reason for this, is I would like the user to be able to only have to drag the folder for which they have files that need to be copied over to the dest. So, maybe they drag C:\dirA\dir1\dir2 to the bat file, it should copy everything under that \dir1 folder, over to the destination folder at X:\totallydifferentrootdir\anotherdiffdir\dir1\dir2 (keeping the directory structure.
I guess a better description, is a batch tool to sychronize two mirrored directories, by letting user drag a folder to have it update the folders and files onto the destination directories.