Hauari
Hauari

Reputation: 43

how to merge two folders by batch cmd

i have this folders and i want to merge in one folder

 - C:\1\a
 - C:\1\b
 - C:\1\c

how to merge this folders to

c:\1

and delete the original by using batch

Upvotes: 2

Views: 7454

Answers (1)

David Ruhmann
David Ruhmann

Reputation: 11367

robocopy /mt /move "C:\1\a" "C:\1" *
robocopy /mt /move "C:\1\b" "C:\1" *
robocopy /mt /move "C:\1\c" "C:\1" *
rd /s /q "C:\1\a"
rd /s /q "C:\1\b"
rd /s /q "C:\1\c"

Help: rd /?, robocopy /?, xcopy /?

Upvotes: 3

Related Questions