ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Post here if you experience file transfer problems or unexpected errors.
Hello,

On a daily basis we transfer a file to an external ftp server but recently experienced a problem. Does anyone know if the "local file" referred to in the above error message is the file being transferred (source file) or the file being overwritten (on the ftp server)? I'm trying to identify what side of the transfer caused the problem.

Below is the full extract from the log file:
VERBOSE(ON)
Verbose mode enabled

OPENHOST(xxxxxx)
Connecting to ftp.xxxxxx.com
Resolving host name "ftp.xxxxxx.com"
Connecting to xxx.xxx.xxx.xxx Port: xx
Connected to ftp.xxxxxx.com.
220 This is a private system
USER xxxxxx
331 Password required for xxxxxx
PASS xxxxxx
230 Logged on
SYST
215 UNIX emulated by FileZilla
FEAT
211-Features:
MDTM
REST STREAM
SIZE
MLST type*;size*;modify*;
MLSD
UTF8
CLNT
MFMT
211 End
OPTS UTF8 ON
200 UTF8 mode enabled
PWD
257 "/" is current directory.

Connected.

PUTFILE("xxx.xxx")
Uploading................. xxx.xxx
DELE xxx.xxx.xxx
550 File not found
TYPE I
200 Type set to I
PASV
227 Entering Passive Mode (91,220,100,34,13,235)
Failed to open file 'xxx.xxx'.

The process cannot access the file because it is being used by another process.
***** PUTFILE Error #16024: Error reading local file.

CWD /
250 CWD successful. "/" is current directory.
PWD
257 "/" is current directory.


CLOSEHOST
QUIT
221 Goodbye
Client closed the connection.

Disconnected.
Thanks,

Keith
Hello Keith,
The process cannot access the file because it is being used by another process.
***** PUTFILE Error #16024: Error reading local file.
This means that ScriptFTP cannot read the file contents and therefore upload it because it is opened (and blocked) by other program running in your computer. To prevent this from happening you can use the command ADDEXCLUSION to exclude this file from the upload process. This is useful if, for example, this file is always blocked and you want the upload to be continued.

If the files sometimes are blocked by another process and sometimes not you can upload every file separately with the FOREACH command. This will make the upload process to continue regardless if an error is produced or not because PUTFILE is called separately for each file:

[scriptftp="upload_foreach_file.ftp"]# Retrieve the current local directory file listing
GETLIST($list,LOCAL_FILES)

# For each file in $list...
FOREACH $item IN $list
# Upload the file
$result=PUTFILE($item)
# If PUTFILE fails the upload process will continue
# because PUTFILE will be called for the next file in the list
END FOREACH[/ScriptFTP]
Hi Support,

Thanks for your response. Just to clarify a couple of points:

The opened file that you refer to - is this the source (being uploaded) or destination file (being overwritten)?

We are talking about uploading a single file so continuing to the next file is not an option. Would it be possible to send me the commands for emailing a error report via smpt?

Thanks,

Keith