Try something along the lines of this.....
@echo off echo. echo This batch copies the file .\master\rules.ima echo into all subdirectories. It has to be started from echo the root of any of your mail domain's directories. echo. pause
rem building userlist based on directory only dir /B /AD users>dirlist.txt echo.>rulecopy.log echo Please wait while the file is copied ...
rem copy the source file to each directory rem Note that this command must all be on one single line: FOR /F "eol= tokens=1,* delims=/" %%i in (dirlist.txt) do echo %%i>>rulecopy.log && copy .\master\imailabuse.fwd .\users\"%%i" >>rulecopy.log FOR /F "eol= tokens=1,* delims=/" %%i in (dirlist.txt) do echo %%i>>rulecopy.log && copy .\master\imailvirus.fwd .\users\"%%i" >>rulecopy.log FOR /F "eol= tokens=1,* delims=/" %%i in (dirlist.txt) do echo %%i>>rulecopy.log && copy .\master\imailspam.fwd .\users\"%%i" >>rulecopy.log type rulecopy.log echo. echo Check file rulecopy.log for details. echo. :END
Andrew Snowden, ICT Co-ordinator Chealde Hulme School, UK ---------- Original Message ---------------------------------- From: "Postmaster Citynet S.A." <postmaster@citynet.net.ar> Reply-To: IMail_Forum@list.ipswitch.com Date: Sat, 17 Feb 2001 11:07:21
>I have a mail server with 200 domains in it. Has anyone built a script or a >batch file to copy the rules.ima into several directories? > >At 12:08 16/02/2001 +0000, you wrote: >>Put a text file filterbox.fwd in each users mail folder... >>Note: you can use a batch file to do this for you. > > >*********************************** >Guillermo Hechem - Postmaster >Citynet S.A. - Ciudad Internet >Corrientes 840 - Rosario (2000) >Argentina >Tel. 54-341-4470003 - Fax: int. 105 >*********************************** > > > > > > >