Use batch file to copy 1 file to N folders

September 21, 2010 at 08:58:03
Specs: Windows XP
Is it possible to do something like this in a bat file???

copy "C:\config.ini" dir C:\documents and settings "\Application Data\Intel\Wireless\Settings"

I need to copy this file to each computer user's application data folder.


See More: Use batch file to copy 1 file to N folders

Report •

September 22, 2010 at 09:51:01
Hi brumshine,

Try this;


@echo off
set FILE_TO_BE_COPIED=C:\config.ini

set LOCATION1=C:\"Documents and Settings"\User1\"Application Data"\Intel\Wireless\Settings

set LOCATION2=C:\"Documents and Settings"\User2\"Application Data"\Intel\Wireless\Settings




I hope I did helped you.

Kind Regards,


Report •

September 22, 2010 at 10:13:54
This should cycle through the users in your C:\documents and settings folder and copy the file to the folder in each user's folder. If you have Windows Vista or 7 computers in the mix, this will need to be revised (let me know, we can make that work as well)

cd %systemdrive%\Documents and Settings
for /f %%a in ('dir /b') do (
copy c:\config.ini "C:\documents and settings\%%a\Application Data\Intel\Wireless\Settings"

Report •

November 17, 2010 at 13:23:31
I have a question. I like to copy a file to a folder if part of a file name the same as folder. The compapy we work with, has a zip file and in the zip file we have about 100 files, each file contains a 4 digits # belong to that person, I like to be able to move or copy this file to the same 4 digits # folder. Is it possible?

Report •
Related Solutions

Ask Question