Nope, not running on Mac at this point.  So far it's only running on a
Windows machine.  Interesting thought though.

Douglas Neale pointed out that I might not be taking into account the amount
of time that it takes for the files to be placed into the folder.  I added a
little code to check to see if the file is in use, and if it is, bypass the
moving part of the code.  This should leave the file inside the input/hot
folder until the loop returns to the file.  IF it is not in use, rename it
and move it.

I tested it earlier today and it *seems* to have taken care of the problem.


                currentFile.Name = tempRenameDict.Value(currentFile.Name)
                If currentFile.LastErrorCode > 0 then
                  // If there is an error renaming the file, log it.
                  If Keep_Error_Log = True then
                    errString = errString + d.LongTime + Chr(09) +
Str(currentFile.LastErrorCode) + Chr(09) + _
                        "2nd Step (rename)" + Chr(09) + currentFile.Name +
EndOfLine
                  End If
                Else
                  // No error renaming the file, so move the it.
                  currentFile.MoveFileTo currentHotFolderOut
                  // Error moving the file, so log it.
                  If currentFile.LastErrorCode > 0 then
                    If Keep_Error_Log = True then
                      errString = errString + d.LongTime + Chr(09) +
Str(currentFile.LastErrorCode) + Chr(09) + _
                          "2nd Step (move)" + Chr(09) + currentFile.Name +
EndOfLine
                    End If
                  End If
                End If


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to