downloading partial files
2 posts
• Page 1 of 1
downloading partial files
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?
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?
# 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
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
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
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 3 guests

