Link to home
Start Free TrialLog in
Avatar of NancyCPS
NancyCPS

asked on

Copy files from subfolders to one folder with no subfolders

Hello,

I need to create a batch file to copy files from a folder with subfolders and place them in a destination folder without the entire tree struction.

I have tried XCOPY but it copies the entire structure.  I didn't see any of the swtiches to remove the subfolders.

Thanks so much!!!
ASKER CERTIFIED SOLUTION
Avatar of John-Charles-Herzberg
John-Charles-Herzberg
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Aaron Tomosky
Robocopy.

for /f %a in ('dir /s /b') do move %a c:\test\

try this..

Note that if duplicates found it will not overrite

Avatar of NancyCPS
NancyCPS

ASKER

Thanks soooooooooo much.