There are various ways of doing this. How about the following in a batch file
for /f %%i in ('dir /ad /s /b') do copy %1 %%i
This will the copy the file you specify (ie %1) to all subdirectories but actually misses out the top level subdirectory, so you can just add that as a 2nd line in the batch file.
hi and thank you both for your help, I was working on creating a warm server back up for my PDC and needed to copy a file to multiple folders to capture NTFS permission.
This is almost exactly what I need for a task I have outstanding, the only difference is that I wish to copy a particular file out to a specifed sub-folder level on a group of users personal drives.
Example:
I have a file called file.txt on the root of D:\ and I wish to copy it into the App folder of all users D:\username\app folders, where I have around 200 Username folders.
So it looks a bit like this:
D:\user1\app
D:\user2\app
D:\user3\app
and the final complication is, that if the file already exists, it shouldn't overwrite it!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.