Actually, here is a better one, it includes the value of the forward address.

bob

-----------begin
@echo off

echo.
echo This batch looks for the file named forward.ima in each users 
echo directory. It can be used to determine the accounts that have a
echo forward setup. It writes out a file of userids (folders) and the
echo contents of the users forward.ima file
echo. Resulting file is named forwards.log
echo I currenly have it writing out the new forward.ima entry for the user.
echo .
rem pause
d:
cd \imail
del GFPSAdmin\forwards.log
rem building userlist based on directory only
dir /B /AD users>GFPSAdmin\dirlist.txt
echo.>GFPSAdmin\forwards.log

echo Please wait searching directories ...

rem This for loop loops through the dirlist.txt file looking for the filename
rem forward.ima in each folder in the file.  If it finds it, it writesthe
rem folder(userid) to the forwards.log file.
rem Note that this command must all be on one single line:

FOR /F "eol= tokens=1,* delims=/" %%i in (GFPSAdmin\dirlist.txt) do for
%%i in (.\users\%%i\forward.ima) do if exist %%i echo %%i forwards to >>
GFPSAdmin\forwards.log |type %%i >> GFPSAdmin\forwards.log|echo. >>
GFPSAdmin\forwards.log

rem echo Check file GFPSAdmin\forwards.log for details.
rem echo.
------------------end


On Wednesday, January 28, 2004 9:23 AM, Bob McGregor <[EMAIL PROTECTED]> wrote:
>You can identify the forwards by looking for a forward.ima file
>in each user directory. Below is a batch file that will create
>a file containing the forwards that are currently set.
>You will need to set the right directory locations for your
>users and where you want the  forward.log file written.
>GFPSAdmin is my directory under the Imail directory for
>administrative stuff
>



To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/

Reply via email to