RE: LotusScript reading files Domino on Linux

[email protected] Tue, 5 Dec 2006 11:29:22 +0100
Newsgroups gmane.linux.suse.domino
Message-ID <[email protected]>
--=_alternative 00399BDFC125723B_=
Content-Type: text/plain; charset="US-ASCII"

Hello Mohamed!

the command Dir$(...) as you use it, returns a string, not a variant.
Your code returns a "type mismatch" error on the line "Forall testfile In 
varFiles"

the following code does work (at least on my Linux box):
Sub Initialize
        Dim session As New NotesSession
        Dim agentlog As NotesLog
        Dim iPos As Integer, iPrevPos As Integer
        Dim sPath As String
        Dim sFile As String
        Dim varFiles As Variant
 
        On Error Goto Error_Handler
        sPath =  "/os_backup/smartplan/" 
        sFile = "test.txt"
 
     'Check to see if file exists and return results... 
        Set agentlog = New NotesLog("Test Filepath")
        Call agentlog.OpenAgentLog
        Call agentlog.LogAction("About to test ...")
 
'       varFiles = Dir$(sPath, 0)
        testfile = Dir$(sPath, 0)
'       Call agentlog.LogAction(testfile)
'       Forall testfile In varFiles 
        Do While  testfile <> ""
                Call agentlog.LogAction("Found " & testfile)
                If testfile = sFile Then
                        Call agentlog.LogAction("Found file " & sPath & 
sFile)
                Else
                        Call agentlog.LogAction("File " & sPath & sFile & 
" not found") 
                End If
                testfile = Dir$()
        Loop
'       End Forall
 
        Call agentlog.LogAction("Finished")
        Call agentlog.Close
 
        Exit Sub
 
Error_Handler:
        Call agentlog.LogAction("An error occurred")
        Call agentlog.LogAction("Error" & Str(Err) & ": " & Error$& " on 
line " & Cstr(Erl))
        Call agentlog.LogAction("Finished")
        Call agentlog.Close
        Exit Sub
End Sub

The directory "/os_backup/smartplan/":
[notes2: smartplan]$ ls -l
total 0
-rw-r--r--    1 notes2   notes           0 Dec  5 11:22 nonsense.txt
-rw-r--r--    1 notes2   notes           0 Dec  5 10:41 test.txt
-rw-r--r--    1 notes2   notes           0 Dec  5 10:41 text.txt

Agentlog output:
Started running agent 'Chris Test Filepath' on 05.12.2006 11:23:14
Running on new or modified documents: 752 total
Found 752 document(s) that match search criteria
05.12.2006 11:23:14: About to test ...
05.12.2006 11:23:14: Found text.txt
05.12.2006 11:23:14: File /os_backup/smartplan/test.txt not found
05.12.2006 11:23:14: Found test.txt
05.12.2006 11:23:14: Found file /os_backup/smartplan/test.txt
05.12.2006 11:23:14: Found nonsense.txt
05.12.2006 11:23:14: File /os_backup/smartplan/test.txt not found
05.12.2006 11:23:14: Finished
Ran LotusScript code
Done running agent 'Chris Test Filepath' on 05.12.2006 11:23:14

Best regards,
        Rainer




"Nur, Mohamed S" <[email protected]> 
05.12.2006 01:01

To
<[email protected]>, <[email protected]>
cc
<[email protected]>
Subject
RE: [suse-domino] LotusScript reading files Domino on Linux






The notes user running the domino task has suffient rights, and this is 
the log out of the agent.
 
Started running agent 'Chris Test Filepath' on 05/12/2006 09:39:45
Running on all documents in database: 90 total
Found 90 document(s) that match search criteria
05/12/2006 09:39:45: Started
05/12/2006 09:39:45: Attempting to open file /os_backup/smartplan/text.txt
05/12/2006 09:39:45: Error when attempting to open file 
/os_backup/smartplan/text.txt
Ran LotusScript code
Done running agent 'Chris Test Filepath' on 05/12/2006 09:39:45
 
 
 

From: [email protected] [mailto:[email protected]] 
Sent: Monday, 4 December 2006 6:12 PM
To: Nur, Mohamed S
Cc: [email protected]
Subject: RE: [suse-domino] LotusScript reading files Domino on Linux


Hello! 
Does the Linux user running Domino have sufficient rights on the directory 
"/os_backup/smartplan/" and the file "test.txt"? 

Is the "test.txt" file the only file in the directory 
"/os_backup/smartplan/"? 
if yes, place more files in the directory and please post the agents 
agentlog output. 

Best regards, 
Rainer Gamauf 



"Nur, Mohamed S" <[email protected]> 
04.12.2006 05:07 


To
<[email protected]> 
cc

Subject
RE: [suse-domino] LotusScript reading files Domino on Linux









Hi having problem running the following scripts in suse linux where it
works
Fine under windows.

Any clues...? The path I have is

sPath =  "/os_backup/smartplan/" 
                sFile = "test.txt"

Where in windows

sPath = "c:\os_backup\smartplan\" 
sFile = "test.txt"



Scripts below:

________________________________________________________________________
_____________


Dim session As New NotesSession
                Dim agentlog As NotesLog
                Dim iPos As Integer, iPrevPos As Integer
                Dim sPath As String
                Dim sFile As String
                Dim varFiles As Variant
 
                On Error Goto Error_Handler
                sPath =  "/os_backup/smartplan/" 
                sFile = "test.txt"
 
    'Check to see if file exists and return results... 
                Set agentlog = New NotesLog("Test Filepath")
                Call agentlog.OpenAgentLog
                Call agentlog.LogAction("About to test ...")
 
                varFiles = Dir$(sPath, 0)
                Forall testfile In varFiles  
                                 Call agentlog.LogAction("Found " & 
testfile)
                                 If testfile = sFile Then
                                                  Call 
agentlog.LogAction("Found file " & sPath &
sFile)
                                 Else
                                                  Call 
agentlog.LogAction("File " & sPath & sFile
& " not found")  <==  I only ever get this message in the agent log
                                 End If
                End Forall
 
                Call agentlog.LogAction("Finished")
                Call agentlog.Close
 
                Exit Sub
 
Error_Handler:
                Call agentlog.LogAction("An error occurred")
                Call agentlog.LogAction("Finished")
                Call agentlog.Close
                Exit Sub

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


--=_alternative 00399BDFC125723B_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hello Mohamed!</font>
<br>
<br><font size=2 face="sans-serif">the command Dir$(...) as you use it,
returns a string, not a variant.</font>
<br><font size=2 face="sans-serif">Your code returns a &quot;type mismatch&quot;
error on the line &quot;</font><font size=2><tt>Forall testfile In varFiles</tt></font><font size=2 face="sans-serif">&quot;</font>
<br>
<br><font size=2 face="sans-serif">the following code does work (at least
on my Linux box):</font>
<br><font size=2>Sub Initialize</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Dim session As New
NotesSession</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Dim agentlog As NotesLog</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Dim iPos As Integer,
iPrevPos As Integer</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Dim sPath As String</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Dim sFile As String</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Dim varFiles As Variant</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; On Error Goto Error_Handler</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; sPath = &nbsp;&quot;/os_backup/smartplan/&quot;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; sFile = &quot;test.txt&quot;</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2>&nbsp; &nbsp; &nbsp;'Check to see if file exists and return
results... &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Set agentlog = New
NotesLog(&quot;Test Filepath&quot;)</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Call agentlog.OpenAgentLog</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Call agentlog.LogAction(&quot;About
to test ...&quot;)</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2>' &nbsp; &nbsp; &nbsp; &nbsp;varFiles = Dir$(sPath,
0)</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; testfile = Dir$(sPath,
0)</font>
<br><font size=2>' &nbsp; &nbsp; &nbsp; &nbsp;Call agentlog.LogAction(testfile)</font>
<br><font size=2>' &nbsp; &nbsp; &nbsp; &nbsp;Forall testfile In
varFiles &nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Do While &nbsp;testfile
&lt;&gt; &quot;&quot;</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; Call agentlog.LogAction(&quot;Found &quot; &amp; testfile)</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; If testfile = sFile Then</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Call agentlog.LogAction(&quot;Found
file &quot; &amp; sPath &amp; sFile)</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; Else</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Call agentlog.LogAction(&quot;File
&quot; &amp; sPath &amp; sFile &amp; &quot; not found&quot;) </font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; End If</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; testfile = Dir$()</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Loop</font>
<br><font size=2>' &nbsp; &nbsp; &nbsp; &nbsp;End Forall</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Call agentlog.LogAction(&quot;Finished&quot;)</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Call agentlog.Close</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Exit Sub</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2>Error_Handler:</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Call agentlog.LogAction(&quot;An
error occurred&quot;)</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Call agentlog.LogAction(&quot;Error&quot;
&amp; Str(Err) &amp; &quot;: &quot; &amp; Error$&amp; &quot; on line &quot;
&amp; Cstr(Erl))</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Call agentlog.LogAction(&quot;Finished&quot;)</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Call agentlog.Close</font>
<br><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; Exit Sub</font>
<br><font size=2>End Sub</font>
<br>
<br><font size=2 face="sans-serif">The directory &quot;/os_backup/smartplan/&quot;:</font>
<br><font size=2>[notes2: smartplan]$ ls -l</font>
<br><font size=2>total 0</font>
<br><font size=2>-rw-r--r-- &nbsp; &nbsp;1 notes2 &nbsp; notes &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; 0 Dec &nbsp;5 11:22 nonsense.txt</font>
<br><font size=2>-rw-r--r-- &nbsp; &nbsp;1 notes2 &nbsp; notes &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; 0 Dec &nbsp;5 10:41 test.txt</font>
<br><font size=2>-rw-r--r-- &nbsp; &nbsp;1 notes2 &nbsp; notes &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; 0 Dec &nbsp;5 10:41 text.txt</font>
<br>
<br><font size=2 face="sans-serif">Agentlog output:</font>
<br><font size=2>Started running agent 'Chris Test Filepath' on 05.12.2006
11:23:14</font>
<br><font size=2>Running on new or modified documents: 752 total</font>
<br><font size=2>Found 752 document(s) that match search criteria</font>
<br><font size=2>05.12.2006 11:23:14: About to test ...</font>
<br><font size=2>05.12.2006 11:23:14: Found text.txt</font>
<br><font size=2>05.12.2006 11:23:14: File /os_backup/smartplan/test.txt
not found</font>
<br><font size=2>05.12.2006 11:23:14: Found test.txt</font>
<br><font size=2>05.12.2006 11:23:14: Found file /os_backup/smartplan/test.txt</font>
<br><font size=2>05.12.2006 11:23:14: Found nonsense.txt</font>
<br><font size=2>05.12.2006 11:23:14: File /os_backup/smartplan/test.txt
not found</font>
<br><font size=2>05.12.2006 11:23:14: Finished</font>
<br><font size=2>Ran LotusScript code</font>
<br><font size=2>Done running agent 'Chris Test Filepath' on 05.12.2006
11:23:14</font>
<br>
<br><font size=2 face="sans-serif">Best regards,</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Rainer</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;Nur, Mohamed S&quot;
&lt;[email protected]&gt;</b> </font>
<p><font size=1 face="sans-serif">05.12.2006 01:01</font>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">&lt;[email protected]&gt;,
&lt;[email protected]&gt;</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top><font size=1 face="sans-serif">&lt;[email protected]&gt;</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">RE: [suse-domino] LotusScript
reading files Domino on Linux</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 color=blue face="Arial">The notes user running the domino
task has suffient rights, and this is the log out of the agent.</font>
<p><font size=3>&nbsp;</font>
<p><font size=2>Started running agent 'Chris Test Filepath' on 05/12/2006
09:39:45</font>
<p><font size=2>Running on all documents in database: 90 total</font>
<p><font size=2>Found 90 document(s) that match search criteria</font>
<p><font size=2>05/12/2006 09:39:45: Started</font>
<p><font size=2>05/12/2006 09:39:45: Attempting to open file /os_backup/smartplan/text.txt</font>
<p><font size=2>05/12/2006 09:39:45: <b>Error when attempting to open file
</b></font><font size=2 color=red><b>/os_backup/smartplan/text.txt</b></font>
<p><font size=2>Ran LotusScript code</font>
<p><font size=2>Done running agent 'Chris Test Filepath' on 05/12/2006
09:39:45</font>
<p><font size=3>&nbsp;</font>
<p><font size=3>&nbsp;</font>
<p><font size=3>&nbsp;</font>
<br>
<br>
<hr><font size=2 face="Tahoma"><b>From:</b> [email protected] [mailto:[email protected]]
<b><br>
Sent:</b> Monday, 4 December 2006 6:12 PM<b><br>
To:</b> Nur, Mohamed S<b><br>
Cc:</b> [email protected]<b><br>
Subject:</b> RE: [suse-domino] LotusScript reading files Domino on Linux</font><font size=3><br>
</font>
<br><font size=2 face="sans-serif"><br>
Hello!</font><font size=3> </font><font size=2 face="sans-serif"><br>
Does the Linux user running Domino have sufficient rights on the directory
</font><font size=2><tt>&quot;/os_backup/smartplan/&quot;</tt></font><font size=2 face="sans-serif">
and the file </font><font size=2><tt>&quot;test.txt&quot;</tt></font><font size=2 face="sans-serif">?</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
Is the </font><font size=2><tt>&quot;test.txt&quot;</tt></font><font size=2 face="sans-serif">
file the only file in the directory </font><font size=2><tt>&quot;/os_backup/smartplan/&quot;</tt></font><font size=2 face="sans-serif">?</font><font size=3>
</font><font size=2 face="sans-serif"><br>
if yes, place more files in the directory and please post the agents agentlog
output.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Best regards,</font><font size=3> </font><font size=2 face="sans-serif"><br>
Rainer Gamauf</font><font size=3> <br>
<br>
<br>
</font>
<table width=100%>
<tr valign=top>
<td width=49%><font size=1 face="sans-serif"><b>&quot;Nur, Mohamed S&quot;
&lt;[email protected]&gt;</b> </font>
<p><font size=1 face="sans-serif">04.12.2006 05:07</font><font size=3>
</font>
<td width=50%>
<br>
<table width=100%>
<tr>
<td width=13%>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td width=86% valign=top><font size=1 face="sans-serif">&lt;[email protected]&gt;</font><font size=3>
</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">RE: [suse-domino] LotusScript
reading files Domino on Linux</font></table>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=49%>
<td width=50%></table>
<br></table>
<br><font size=3><br>
<br>
</font><font size=2><tt><br>
<br>
Hi having problem running the following scripts in suse linux where it<br>
works<br>
Fine under windows.<br>
<br>
Any clues...? The path I have is<br>
<br>
sPath = &nbsp;&quot;/os_backup/smartplan/&quot; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sFile = &quot;test.txt&quot;<br>
<br>
Where in windows<br>
<br>
sPath = &quot;c:\os_backup\smartplan\&quot; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; <br>
sFile = &quot;test.txt&quot;<br>
<br>
<br>
<br>
Scripts below:<br>
<br>
________________________________________________________________________<br>
_____________<br>
<br>
<br>
Dim session As New NotesSession<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim agentlog As
NotesLog<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim iPos As Integer,
iPrevPos As Integer<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim sPath As String<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim sFile As String<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim varFiles As
Variant<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;On Error Goto Error_Handler<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sPath = &nbsp;&quot;/os_backup/smartplan/&quot;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sFile = &quot;test.txt&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp;'Check to see if file exists and return results... &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Set agentlog =
New NotesLog(&quot;Test Filepath&quot;)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Call agentlog.OpenAgentLog<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Call agentlog.LogAction(&quot;About
to test ...&quot;)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;varFiles = Dir$(sPath,
0)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Forall testfile
In varFiles &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Call agentlog.LogAction(&quot;Found
&quot; &amp; testfile)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If testfile = sFile Then<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;Call agentlog.LogAction(&quot;Found file &quot;
&amp; sPath &amp;<br>
sFile)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Else<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;Call agentlog.LogAction(&quot;File &quot; &amp;
sPath &amp; sFile<br>
&amp; &quot; not found&quot;) &nbsp;&lt;== &nbsp;I only ever get this message
in the agent log<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End Forall<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Call agentlog.LogAction(&quot;Finished&quot;)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Call agentlog.Close<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Exit Sub<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
Error_Handler:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Call agentlog.LogAction(&quot;An
error occurred&quot;)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Call agentlog.LogAction(&quot;Finished&quot;)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Call agentlog.Close<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Exit Sub<br>
<br>
-- <br>
To unsubscribe, e-mail: [email protected]<br>
For additional commands, e-mail: [email protected]</tt></font><font size=3><br>
</font>
<br>
--=_alternative 00399BDFC125723B_=--