Do I need to be concerned about having this error detection and retrying when renaming the file, or is this the type of operation that will override the types of locks that might happen when IMail, Declude and Sniffer log to their text files? I don't care if the script fails due to some serious issue on the server, but I would like to stop these every-day types of issues with locks or whatever it is.
Thanks,
Matt
Colbeck, Andrew wrote:
Yeah, what Pete said!
This is especially true with monster log files being moved around on the same spindle(s).
And it's a great tip when you want to delete or update a file that is in use, even if it's running. Rename it, and you're done. I've had to use this tip many times when patching a balky application, or I couldn't kill a virus (rename it, delete the renamed file and reboot, and it doesn't matter that it tries to launch itself by writing 10 different spots in the registry.
Andrew 8)
-----Original Message-----
From: Pete McNeil [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 17, 2004 4:58 PM
To: Matt
Subject: Re[2]: [Declude.JunkMail] Log file locking???
On Wednesday, November 17, 2004, 7:38:44 PM, Matt wrote:
M> Thanks to both of you for the guidance.
M> Kevin, sleep.exe is from the Resource Kit.
M> I've coded up a script fragment that should handle this, but I would M> appreciate some feedback on if this is the correct way to go. M> Obvious declarations omitted: ' Disable error handling
M> On Error Resume Next
M> ' Move the specified file, retry after 5 seconds if error is found, M> limit to 100 tries. intRetry = 100 Do While intRetry > 0
M> objFS.MoveFile strSource, strDestination
If I might add a few pennies to this. I recommend that you rename the files before moving them. This will minimize the amount of time spent potentially in conflict with other programs. Renaming a file takes almost no time compared to moving it. Once the file is renamed, the move can proceed leisurely.
Hope this helps, _M
--- [This E-mail was scanned for viruses by Declude Virus (http://www.declude.com)]
--- This E-mail came from the Declude.JunkMail mailing list. To unsubscribe, just send an E-mail to [EMAIL PROTECTED], and type "unsubscribe Declude.JunkMail". The archives can be found at http://www.mail-archive.com. --- [This E-mail was scanned for viruses by Declude Virus (http://www.declude.com)]
--- This E-mail came from the Declude.JunkMail mailing list. To unsubscribe, just send an E-mail to [EMAIL PROTECTED], and type "unsubscribe Declude.JunkMail". The archives can be found at http://www.mail-archive.com.
-- ===================================================== MailPure custom filters for Declude JunkMail Pro. http://www.mailpure.com/software/ =====================================================
--- [This E-mail was scanned for viruses by Declude Virus (http://www.declude.com)]
--- This E-mail came from the Declude.JunkMail mailing list. To unsubscribe, just send an E-mail to [EMAIL PROTECTED], and type "unsubscribe Declude.JunkMail". The archives can be found at http://www.mail-archive.com.
