You are here:  » auto download script

Support Forum



auto download script

Submitted by maxbear on Sun, 2009-03-29 06:34 in

Hello,

I tried to follow automatic download guide, but I got a problem. For example, if I download and unzipped the file, it usually give me the following files:

fileA.xml fileA.xml? fileA.zip

If I add the rm command to the sh file, only fileA.xml? will be left in the folder and I can't even register it.

Does anyone got any idea of why this happen? Thanks.

Here is my example sh:

#!/bin/sh
#########
# FETCH #
#########
/usr/bin/wget -O "/path/fileA.zip" "http://url"
#########################
# DECOMPRESS AND DELETE #
#########################
/usr/bin/unzip -p /path/fileA.zip > /path/fileA.xml
rm /path/fileA.zip

Submitted by support on Sun, 2009-03-29 08:26

Hi,

That sounds to me as if the .zip file is corrupt, so unzip is creating the ? file with any content in the file that cannot be unzipped.

What I would do is download http://url to your local computer, and check that the download is a valid .zip file by attempting to open it with something like Winzip. If that looks OK, perhaps if you could email me the URL i'll take a look for you...

Cheers,
David.