开发者

merge two folder structures - batch script of vbs

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

etc

what 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 folders

the end result would be:

\192.168.1.1\db\RAW\A 001\Docs\A 001

Any 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜