How to copy files from folder tree dropping all the folders with Robocopy?

Viewed 44523

I have the following folder structure:

FolderA
--Folder1
--Folder2
--Folder3
...
--Folder99

Folders 1 through 99 have files in them.

All I want to do is to copy ALL THE FILES into ONE FOLDER, basically do a FolderA copy, and wipe out Folders 1-99 keeping all the files.

I'd like to do it with Robocopy from cmd.exe if possible (Windows Server 2008)

3 Answers
Get-ChildItem -Path source -Recurse -File | Move-Item -Destination dest
Related