Link to home
Create AccountLog in
Avatar of Dominator1025
Dominator1025

asked on

How do I paste a file into 100+ folders in the same directory at the same time?

I have an excel file in a Directory A.  There are also 100+ other folders in directory A. I would like to create a program that pastes the Excel file into all of the 100+ folders in the directory.  PLease help!
Avatar of Eirman
Eirman
Flag of Ireland image

Avatar of Dominator1025
Dominator1025

ASKER

The link to the Directory V Lister program doesn't work
Try this free directory lister
http://www.portablefreeware.com/?id=1157
Hi, Dominator1025.

Please save the attached into Directory A. Edit it to change "Apples.xls" to the required name (safest to leave the double-quotes even if not actually needed). Change the file extension to ".Bat" and run the batch file.

Couple of points...
(1) The "/Y" switch means that it will silently overwrite. Drop it if you want warnings (one for each file!).
(2) If you just want to run the command in a dos box, CD to the directory and enter...
for /d %a in (*.*) do copy /Y "Apples.xls" "%a"
(3) If you don't want to run this from the actual directory then please let us know the full Directory path.

Edit: I've assumed that the spreadsheet is also in Directory A. If that's not the situation, please post its directory here.

Thanks,
Brian.Copy-to-All-Sub-Folders.txt
Brian,

Can I substitue my actual path for "a" in the text you sent?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of redmondb
redmondb
Flag of Afghanistan image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Thanks, Dominator1025.

Unlike the rest of the English-speaking world, in Experts Exchange, "Good" means..."Not Good". To quote from one of the Help pages...
An A grade should be given if you receive the solution from the Experts; you should consider the A grade the default unless it is deficient.
...and...
It is customary to explain any grade that is not an A.

Please do one of the following...
 - If you genuinely feel that the answers were deficient then please explain why.
 - If all the above was new to you (it is well concealed in the site) and you want to give an A grade then please click on the Request Attention button above and ask for one of the Mod's to change the Grade. (He/she may simply "unclose" the question so you can do it yourself.)
 - If you would like clarification/confirmation of what I've said then click on the Request Attention and ask for a Mod's assistance.

I'm sorry to be such a nuisance, but B's and C's are considered to be blots on an expert's record so it's important that they're only there for valid reasons.

Many Thanks,
Brian.