Computing.Net > Forums > Programming > batch file to copy to many folders

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

batch file to copy to many folders

Reply to Message Icon

Name: Michael Rosciam
Date: January 13, 2009 at 09:24:15 Pacific
OS: Windows Vista
CPU/Ram: Intel core 2 duo T7300@2.00 GHZ and 2.00 GB
Product: Lenovo laptop / T61P
Subcategory: Batch
Comment:

I am curious to find out how this can be done with a batch (.bat) file on Vista. I need to be able to copy two folder files into numerous folders all on a mapped drive at W. The folders are named based on the clients name, which means the names are like aaa acctg, a&e inc, bat inc and so on. How do I make it so the batch file copies the folders from my c drive into all the folders on the w drive and not overwriting any existing information within the folders on the W drive already.



Sponsored Link
Ads by Google

Response Number 1
Name: reno
Date: January 13, 2009 at 10:52:35 Pacific
Reply:

@echo off
pushd w:\
for /d %%b in (*) do echo n|copy /-y "c:\batch\folder1\*.*" "%%b"
popd

tested on xp, dunno about vista. modify the code for folder 2.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: batch file to copy to many folders

Batch file to copy to many folders www.computing.net/answers/programming/batch-file-to-copy-to-many-folders/16371.html

batch file to copy & increment www.computing.net/answers/programming/batch-file-to-copy-increment/18184.html

Batch file to append created date www.computing.net/answers/programming/batch-file-to-append-created-date/14993.html