Welcome to WebmasterWorld Guest from

Forum Moderators: phranque

Message Too Old, No Replies

Script or unity to unzip compressed files on remote server

5:21 pm on Dec 30, 2005 (gmt 0)

10+ Year Member

It would be faster to upload a compressed files to remote server. Is there any script or unity available to unzip compressed files on remote server? I use WS_FTP. My hosting company's control panel does not provide this option. It is a Linux/Unix shared hosting.
9:41 pm on Dec 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

If you have shell access or can create cron jobs then you can run

unzip or gunzip depending what is installed.

I regularily upload zip files and use a cronjob to check for the existance of a file and unzip it.

# unzip_uploads

cd /home/myuploads
unzip -o ZIPPEDFILE.ZIP -d /home/myuploads
cp ZIPPEDFILE.ZIP old/`date +%d%m%y`.zip

cronjob is set to run that file every 10 minutes.

First it checks for the existence of a ZIP_UPLOADED_FLAG file. This is just a dummy file and is FTP'd after the zip file. The reason for doing this is so that the script will only run after the zip file has been uploaded 100%.

Next, if the zipfile exists it is unzipped and overwrites existing files.

Lastly the zip file is copied to an archive dir and the name changed to the datestamp.

6:11 am on Dec 31, 2005 (gmt 0)

10+ Year Member

Hi Frank_Rizzo,

Sorry, my hosting company does not support shell access.

7:31 am on Dec 31, 2005 (gmt 0)

10+ Year Member

Use the File Manager in Cpanel and the extract your zip files from there.

Featured Threads

Hot Threads This Week

Hot Threads This Month