Hi,
are there and standards for writing scripts for automating FTP sessions?
Reason I ask is at work we have an issue with our (outsourced) IT guys FTPing files to our (outsourced) printing suppliers and I don't know who, if anyone, is to blame.
Is there an accepted way of dealing with interrupted sessions (due to connection problems for example)?
This is the redacted and shortened log from our end of the transfer.
The file names change daily and include the date.
Is IT's script making dangerous assumptions or is it simply not clever enough? Should it be checking if files to exist before it transfers them? Should it not be trying to transfer files it's already sent, ie not relying on the receiving server to reject existing files?
This is why I ask if there's a standard protocol for FTP scripting and the assumptions it safe to make about the other servers behaviour.
are there and standards for writing scripts for automating FTP sessions?
Reason I ask is at work we have an issue with our (outsourced) IT guys FTPing files to our (outsourced) printing suppliers and I don't know who, if anyone, is to blame.
Is there an accepted way of dealing with interrupted sessions (due to connection problems for example)?
This is the redacted and shortened log from our end of the transfer.
Code:
Attempt 1.... (several files already transferred OK at this point)
Starting request
Opening remote file "[directory redacted]20141203_020022.27_CL01.zip" for writing
Uploading local file "[directory redacted]20141203_020022.27_CL01.zip"
# transferred 2106963 bytes in 0.577 seconds, 29202.486 kbps ( 3650.311 kBps), transfer succeeded.
Opening remote file [directory redacted]020343.51_CL01.zip" for writing
Uploading local file "[directory redacted]020343.51_CL01.zip"
# transferred 2357980 bytes in 0.515 seconds, 36642.982 kbps ( 4580.373 kBps), transfer failed.
(IT say at this point the script terminated)
Attempt 2....
Starting request
Opening remote file "[directory redacted]20141203_020022.27_CL01.zip" for writing
Permission denied: Permission denied (IT say this was expected as file is there already)
Opening remote file [directory redacted]20141203_020343.51_CL01.zip" for writing
Permission denied: Permission denied (IT say this was unexpected, as the file failed to transfer
in earlier attempt. I think the script terminated at this point but IT haven't said for
definite and I don't have the complete log)
Attempt 3.....
Starting request
Opening remote file "[directory redacted]20141203_020022.27_CL01.zip" for writing
Uploading local file "[directory redacted]20141203_020022.27_CL01.zip"
# transferred 2106963 bytes in 0.546 seconds, 30871.202 kbps ( 3858.900 kBps), transfer succeeded.
(IT say this was unexpected, as this file is already there.)
Opening remote file "[directory redacted]20141203_020343.51_CL01.zip" for writing
Uploading local file "[directory redacted]20141203_020343.51_CL01.zip"
# transferred 8540419 bytes in 1.732 seconds, 39456.705 kbps ( 4932.088 kBps), transfer succeeded.
(IT says this was expected)
The file names change daily and include the date.
Is IT's script making dangerous assumptions or is it simply not clever enough? Should it be checking if files to exist before it transfers them? Should it not be trying to transfer files it's already sent, ie not relying on the receiving server to reject existing files?
This is why I ask if there's a standard protocol for FTP scripting and the assumptions it safe to make about the other servers behaviour.