Unix/Linux Go Back    

Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

How to check if downloading of a file is completed?

Shell Programming and Scripting


Thread Tools Search this Thread Display Modes
Old Unix and Linux 01-09-2017   -   Original Discussion by looney
rbatte1's Unix or Linux Image
rbatte1 rbatte1 is offline Forum Staff  
Root armed
Join Date: Jun 2007
Last Activity: 19 January 2018, 12:39 PM EST
Location: Lancashire, UK
Posts: 3,441
Thanks: 1,493
Thanked 671 Times in 604 Posts
Maybe it would be sufficient to have the 3rd party send the file as file.xxx and then on completion, they could rename it to be file.zip or whatever you agree it to be. That way you have to just test if the file exists to process it. You could just use simple filenames or have a loading directory that the file is then moved from by the 3rd party when the transfer completes.

Of course, this relies on the 3rd party process to send then rename the file.

If they are using a GUI, (e.g. Filezilla) then you could ask them to send a simple flag file after the data being transmitted. They would need to ensure that they have their queue limited to one transfer at a time, else they could get out of sequence. The flag file might need to be named something like file.zzz to ensure it follows the data file, but it is less satisfactory using a GUI because there are more risks of transferring the flag file early.

I hope that this helps,
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need help in not fetching a file while file writing operation is not completed world.apps UNIX for Dummies Questions & Answers 2 04-18-2012 01:29 AM
File downloading help in perl srijith Shell Programming and Scripting 0 07-21-2011 08:08 AM
File downloading imad77 Shell Programming and Scripting 2 10-22-2008 12:38 AM
Downloading file from internet chetanpc Shell Programming and Scripting 4 03-25-2008 05:36 PM
Downloading Excel File matrixmadhan UNIX for Dummies Questions & Answers 4 01-16-2008 01:14 PM

All times are GMT -4. The time now is 03:15 PM.