Roger,
This scripts works great. Sorry, I got this from the list and don't know who
to credit for writing it. You'll have to update file location.
I've probably hacked it up from it original. You could probably check the
archives if you want the original.
Dim objShell, objFSO, objFolder, objTSfwd, folders
Dim strInFile, strOutFile
Dim imPath, user, strFwd
Dim tfoDest
If WScript.Arguments.Count = 1 Then
If InStr(WScript.Arguments.Item(0), "?") Then Call Usage()
imPath = WScript.Arguments.Item(0)
Else
Call Usage()
End If
'Create File System Objects for opening files...
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set tfoDest = objFSO.CreateTextFile("C:\temp\allforward.ima", true )
'List subfolders from Imail Users Directory...
Set objFolder = objFSO.GetFolder(imPath)
Set folders = objFolder.SubFolders
'Check each folder for a forward.ima file and report contents...
For each folder in folders
user = folder.Name
strFwdFile = imPath & "\" & user & "\forward.ima"
If objFSO.FileExists(strFwdFile) Then
'WScript.Echo "Found: " & strFwdFile
Set objTSfwd = objFSO.OpenTextFile(strFwdFile, 1, False)
If Err.Number Then
WScript.Echo "Unable to open & read '" & strFwdFile
WScript.Quit(1)
End If
strFwd = objTSfwd.ReadLine
' WScript.Echo user & "|" & strFwd
tfoDest.WriteLine( user & " " & strFwd)
objTSfwd.Close
End If
Next
'Clean-up for variables & objects...
Set objTSfwd = Nothing
Set objFSO = Nothing
Set objShell = Nothing
Wscript.Quit(0)
Sub Usage()
WScript.Echo vbNewLine & "-=[ FastFwd.vbs ]=-"
WScript.Echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & vbNewLine
WScript.Echo vbNewLine & " Usage:" & vbNewLine
WScript.Echo vbTab & "> fastfwd.vbs YourIMail\imail\users"
WScript.Quit(0)
End Sub
Gary
----- Original Message -----
From: "Schmeits, Roger" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 08, 2004 1:27 PM
Subject: [IMail Forum] Forward.ima
> I am in the need to grep all (count 200) forward.ima files for email
> addresses. The contents are in the format of [EMAIL PROTECTED] or
> .,[EMAIL PROTECTED] I need to take all those addresses and put them in one
> file. This file will be for ASSP on the no-processing list. What windows
> utility would one use to grep these files on a regular time table?
>
> Has anyone else done this or know of an utility to get the job done?
>
> Roger
>
> 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/
> ---
> [This E-mail scanned for viruses by Declude Virus]
>
>
---
[This E-mail scanned for viruses by Declude Virus]
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/