SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
FTP error trapping

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
FTP error trapping
Author Message
Beppe



Joined: 18 Jun 2001
Posts: 5

Post FTP error trapping Reply with quote

How can I trap the error code ( unable to delete file )after an FTPDeletefile command?
I have to know immediatly after the command if somethin was wrong, i can't wait the end of the running script to know the result.

Many tanks
Beppe


Fri Dec 14, 2001 10:57 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: FTP error trapping Reply with quote

Set job to "ignore errors" and after running FTPDeleteFile,
run FTPFileExists. The result returned by the FTPFileExists will indicate whether FTPDeleteFile succeeded or failed

: How can I trap the error code ( unable to delete file )after an FTPDeletefile
: command?
: I have to know immediatly after the command if somethin was wrong, i can't
: wait the end of the running script to know the result.

: Many tanks
: Beppe

Tue Dec 18, 2001 9:49 am View user's profile Send private message
Beppe



Joined: 18 Jun 2001
Posts: 5

Post Re: FTP error trapping Reply with quote

: Set job to "ignore errors" and after running FTPDeleteFile,
: run FTPFileExists. The result returned by the FTPFileExists will indicate
: whether FTPDeleteFile succeeded or failed
I have to trap the FTPDeleteFile command error because the remote file may be open when a try to detele it, in that case I want retry to delete again the file after waiting x second

Wed Dec 19, 2001 7:50 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: FTP error trapping Reply with quote

Example:

Dim found, boolean

START:

FTPFileDelete( "ftp.com", "myid", "mypassword", "\\data\\acct.bak" )
FTPFileExists( "ftp.com", "myid", "mypassword", "\\data\\acct_dat", found )

If( found, DO_WAIT, SUCCESS )
DO_WAIT:

Wait( 30 )

GoTo( START )
SUCCESS:

... continue after the file is deleted ....

Make sure to set job "ignore errors" property.

: I have to trap the FTPDeleteFile command error because the remote file may be
: open when a try to detele it, in that case I want retry to delete again
: the file after waiting x second

Wed Dec 19, 2001 8:26 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.