Copy a file into every directory

By jocar7 ·
Is there a way to copy a .txt file into every folder, but only two level
down. The alldone.txt resides @ d:\IMS\alldone.txt. I need it to be
copied to d:\IMS\PACS\"Physician's Name"\*.*. I would prefer a batch file
os a script, something that I can set as a scheduled task.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Try this

by Jacky Howe In reply to Copy a file into every di ...

You will have to create a list of the Doctors in notepad to reflect the folder names and save it to the IMS folder as DR.txt
Dr Jones
Dr Bob

Copy and paste the line below into notepad and save it to the IMS folder as finnish.bat

for /f "delims=" %%i in (dr.txt) do echo D|xcopy "d:\IMS\alldone.txt" "d:\IMS\PACS\%%i" /i /z /y

Related Discussions

Related Forums