downloading partial files

Post here if you experience file transfer problems or unexpected errors.

downloading partial files

Postby wglenn » 23 Dec 2011, 17:25

We are seeing instances where it looks like the ftp script is downloading partial files from the ftp. It kicks the script off every 3 minutes
It is getting a result of ok and deleting the file.

Have you seen this before or is there anything I can do to make sure it doesn''t download partial files?

ftp script iconFTP Script: [ Download ] [ Hide ]
# For each file in $list...
FOREACH $item IN $list
    # Download the file
    $result=GETFILE($item)
    #Get the filesize of folder
    $size=GETFILESIZE(REMOTE,$item)
    PRINT("File Size for ".$item. ": ".$size)
    # If the file has been succesfully downloaded
    # delete the remote copy. If not stop the script.
    IF($result=="OK")
       DELETEFILE($item)
       EXEC('xcopy "\\producer\Hires Graphics\AutoFTPDownload\ROP_Color\"'.$item.' "\\producer\Hires Graphics\CTP Broad Color\" /Y')
    END IF
END FOREACH
wglenn
 
Posts: 4
Joined: 04 Mar 2010, 19:35

Re: downloading partial files

Postby ScriptFTP support » 05 Jun 2012, 17:27

It kicks the script off every 3 minutes


It may happen that the file located in the FTP site (uploaded by other FTP client or copied there by other process) is not complete. If you run the script so often this will happen sooner or later.

Consider using lock files. Take a look at this forum topic:

viewtopic.php?f=6&t=566
ScriptFTP support
Site Admin
 
Posts: 624
Joined: 04 Aug 2008, 15:08
Location: Burgos, Spain, EU


Return to Troubleshooting



Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron