Solved

Copy files from subfolders to one folder with no subfolders

Posted on 2011-03-03
4
1,730 Views
Last Modified: 2012-08-14
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
Comment
Question by:NancyCPS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 14

Accepted Solution

by:
John-Charles-Herzberg earned 500 total points
ID: 35027262
0
 
LVL 39

Expert Comment

by:Aaron Tomosky
ID: 35027272
Robocopy.
0
 
LVL 8

Expert Comment

by:subhashchy
ID: 35027296

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

try this..

Note that if duplicates found it will not overrite

0
 
LVL 1

Author Closing Comment

by:NancyCPS
ID: 35027435
Thanks soooooooooo much.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question