I need a script to merge two folder structures:
folder structure 1: \192.168.1.1\db\Docs\A 001 \192.168.1.1\db\Docs\A 002 \192.168.1.1\db\Docs\A 003 etc folder structure 2: \192.168.1.1\db\RAW\A 001 \192.168.1.1\db\RAW\A 002 \192.168.1.1\db\RAW\A 003 etcwhat i need to do is:
1. under "\192.168.1.1\db\RAW\A 001" create subfolder Docs 2 then move folder (with its content) \docs\a 001 to \RAW\Docs\A 001 and the same thing to the remaining foldersthe end result would be:
\192.168.1.1\db\RAW\A 001\Docs\A 001Any one 开发者_开发技巧can help here? Where do I start?
Maybe a simple
move \\192.168.1.1\db\Docs \\192.168.1.1\db\RAW\
would suffice?
Following your answer:
robocopy folder1 folder2 /e /copyall /xc /xn /xo
robocopy folder2 folder1 /e /copyall /xc /xn /xo
See robocopy /?
to see what exclusion switches suit you better. You might have files that differ by content if they have the same name.
精彩评论