Jump to content

Zip Up A Folder And It's Subs


Recommended Posts

I wrote this into a form so all you have to do is enter the simple folder path (ie: cgi-bin or images) and click "Create Zip". Just upload this text file to any directory and give it a .php extension.

 

http://byrondallas.heliohost.org/temp/zip_archive.txt

 

This tool will create a zipped copy of the directory you enter inside the form and output it in the directory it's run in. Leaves your original directory as it was.

 

Cheers,

Byron

 

edit:

 

Use this instead (see post below)

http://byrondallas.heliohost.org/temp/backup_zip.txt

 

Link to comment
Share on other sites

Use this perl script instead. I found out later after much testing that Zip Archives doesn't copy file permissions and all files get reverted back to 644 even if they where 755. I didn't write this script but it works really well. Upload this to your ROOT directory and chmod 755 and give it a .pl or .cgi extension.

 

http://byrondallas.heliohost.org/temp/backup_zip.txt

 

You couild actually run this in any directory but if it's not in the root then you have to give the directory path the full path:

 

ie: /home/byron/public_html/cgi-bin

 

in the root directory you just give it the simple folder path. ie: cgi-bin

 

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...