Link to home
Start Free TrialLog in
Avatar of joe90kane
joe90kane

asked on

Bat script to copy a file to all folders in a directory

Hi all,

I need a .Bat script to copy a file to all folders in a directory

e.g.

Copy "C:\app.mdb" "C:\All folders in the C:\ directory"

There are about 40 folders under the c:\ dir.
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

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 joe90kane
joe90kane

ASKER

Thanks for that oBdA it works great, before I accept the answer would you be so kind to explain the script

/d =
/i =

etc...

Thanks again.
"for /d ..." will run the "for" loop only for *d*irectories, not for files (enter "help for" for more possibilities).
"if /i ..." will run the comparison case *i*nsensitive, otherwise "Windows" and "WINDOWS" would be different.
Thanks for the info.