Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1762
  • Last Modified:

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!!!
0
NancyCPS
Asked:
NancyCPS
1 Solution
 
John-Charles-HerzbergCommented:
0
 
Aaron TomoskySD-WAN SimplifiedCommented:
Robocopy.
0
 
subhashchyCommented:

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

try this..

Note that if duplicates found it will not overrite

0
 
NancyCPSAuthor Commented:
Thanks soooooooooo much.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now