Using procomm version 4.5.
I'm attempting to send a file via FTP in active mode. I believe I have all the defaults set correctly I can send the file manually with a drag and drop. When I use the script to send the file I get:
**********************************
TYPE I
200 Type set to I.
[644] going to listen 0.0.0.0 port 2303
PORT 10,24,160,151,9,0
200 PORT command successful.
[644] listener 0.0.0.0 port 2304
STOR 20051109143923.PGP
150 Opening BINARY mode data connection for /ftp/4ctp/put/20051109143923.PGP.
[644] Socket closed.
[652] accept from 168.183.165.14 port 20
Error opening file - 20051109143923.PGP (13)
[652] Socket closed.
226-File rejected, 0 bytes received .
226 Transfer complete.
quit
[596] Socket closed.
******************************
I'm concerned about the error opening file. The server side folks say all they are getting is a filename and no data.
Here's the portion of the script that run's at that point.
***********************************
FUNC SendFiles:INTEGER
INTEGER lnXmitStatus
STRING lsHostDir
STRING lsInput
STRING lsTemp, lsFile
SET ftp passivemode OFF
IF CJSMODE==0
lsTemp = CJSSFIL[1]
lsHostDir = "/ftp/4ctp/put"
strfmt lsInput "# File %s Was Sent Successfully as Production" CJSSFIL[1]
ELSE
lsTemp = CJSSFIL[1]
lsHostDir = "/ftp/4ctp/put"
strfmt lsInput "# File %s Was Sent Successfully AS TEST!!" CJSSFIL[1]
ENDIF
IF Expect("hello",10,0)
ENDIF
termmsg "We are about to change directories"
termmsg "`r`n"
;*******Local Directory Path Change*************************
FTP LOCAL CHDIR CJSPATH
termmsg "We just changed our local DIR"
termmsg "`r`n"
IF SUCCESS
SendToCJS("STAT","+ Local CHDIR Successful")
ELSE
SendToCJS("STAT","+ Local CHDIR FAILED!!")
RETURN 2
ENDIF
;*******REMOTE directory change******************************
FTP REMOTE CHDIR lsHostDir
termmsg "We just changed their remote DIR"
termmsg "`r`n"
IF SUCCESS
SendToCJS("STAT","+ Remote CHDIR Successful")
PAUSE 1
termmsg "`r`n"
termmsg "CJSSFIL[1] %s" CJSSFIL[1]
termmsg "`r`n"
strright lsFile CJSSFIL[1] 18
SET ftp passivemode OFF
FTP LOCAL copyfile lsFile
IF FAILURE
SendToCJS("STAT","+ Copyfile to remote NOT Successful!!")
RETURN 2
ELSE
SendToCJS("STAT","+ Copyfile to remote Successful")
SendToCJS("STAT",lsInput)
termmsg "`r`n"
termmsg "File sent succesfully"
termmsg "`r`n"
ENDIF
ELSE
SendToCJS("STAT","+ Remote CHDIR FAILED!!")
RETURN 2
ENDIF
IF Expect("hello",10,0)
ENDIF
RETURN 0
ENDFUNC
***********************************
Sorry for the abundance of info, I'd rather have too much than not enough.
I'm attempting to send a file via FTP in active mode. I believe I have all the defaults set correctly I can send the file manually with a drag and drop. When I use the script to send the file I get:
**********************************
TYPE I
200 Type set to I.
[644] going to listen 0.0.0.0 port 2303
PORT 10,24,160,151,9,0
200 PORT command successful.
[644] listener 0.0.0.0 port 2304
STOR 20051109143923.PGP
150 Opening BINARY mode data connection for /ftp/4ctp/put/20051109143923.PGP.
[644] Socket closed.
[652] accept from 168.183.165.14 port 20
Error opening file - 20051109143923.PGP (13)
[652] Socket closed.
226-File rejected, 0 bytes received .
226 Transfer complete.
quit
[596] Socket closed.
******************************
I'm concerned about the error opening file. The server side folks say all they are getting is a filename and no data.
Here's the portion of the script that run's at that point.
***********************************
FUNC SendFiles:INTEGER
INTEGER lnXmitStatus
STRING lsHostDir
STRING lsInput
STRING lsTemp, lsFile
SET ftp passivemode OFF
IF CJSMODE==0
lsTemp = CJSSFIL[1]
lsHostDir = "/ftp/4ctp/put"
strfmt lsInput "# File %s Was Sent Successfully as Production" CJSSFIL[1]
ELSE
lsTemp = CJSSFIL[1]
lsHostDir = "/ftp/4ctp/put"
strfmt lsInput "# File %s Was Sent Successfully AS TEST!!" CJSSFIL[1]
ENDIF
IF Expect("hello",10,0)
ENDIF
termmsg "We are about to change directories"
termmsg "`r`n"
;*******Local Directory Path Change*************************
FTP LOCAL CHDIR CJSPATH
termmsg "We just changed our local DIR"
termmsg "`r`n"
IF SUCCESS
SendToCJS("STAT","+ Local CHDIR Successful")
ELSE
SendToCJS("STAT","+ Local CHDIR FAILED!!")
RETURN 2
ENDIF
;*******REMOTE directory change******************************
FTP REMOTE CHDIR lsHostDir
termmsg "We just changed their remote DIR"
termmsg "`r`n"
IF SUCCESS
SendToCJS("STAT","+ Remote CHDIR Successful")
PAUSE 1
termmsg "`r`n"
termmsg "CJSSFIL[1] %s" CJSSFIL[1]
termmsg "`r`n"
strright lsFile CJSSFIL[1] 18
SET ftp passivemode OFF
FTP LOCAL copyfile lsFile
IF FAILURE
SendToCJS("STAT","+ Copyfile to remote NOT Successful!!")
RETURN 2
ELSE
SendToCJS("STAT","+ Copyfile to remote Successful")
SendToCJS("STAT",lsInput)
termmsg "`r`n"
termmsg "File sent succesfully"
termmsg "`r`n"
ENDIF
ELSE
SendToCJS("STAT","+ Remote CHDIR FAILED!!")
RETURN 2
ENDIF
IF Expect("hello",10,0)
ENDIF
RETURN 0
ENDFUNC
***********************************
Sorry for the abundance of info, I'd rather have too much than not enough.