From this tutorial you’ll learn how to unzip files on your server using unzipper.php script.
Unzipping Files on Server
- First, you need to download unzipper.php script to your hard drive.Open your hosting server cPanel and navigate to the File Manager tool. Select Upload option in the top panel.
- You can also upload it using FTP client (e.g., FileZilla, Total Commander).
- Browse unzipper.php file and upload it to your server. You need to place it in the same directory where you have a ZIP archive.
- Open your browser window and access your website. Add unzipper.php at the end of the link (e.g., http://your-site.com/unzipper.php).
- Select the file to unzip in your browser window and use additional options to define, whether you want to delete the ZIP archive after extraction, or you want to keep it.
- Click Unzip button in order to extract the archived file.
August 28, 2017September 14, 2017
There’s many packaging algorithms, zip is one of them. It has .zip file extension.
Compress a folder using zip
$ zip -r archive.zip foldername
- -r include all files and directories
- archive.zip name of the zip file you want to do
- foldername name of the folder you want to zip
If you don’t have zip installed, in Ubuntu and Debian it can be installed with apt-get:
$ sudo apt-get install zip
Decompress with zip
$ unzip archive.zip
Step 1 — Zipping files or folder
- The first thing you should do is to find a folder or files that you want to zip (archive) and select them. You can select all files that your folder contains by pressing CTRL+A. If you want to select separate files in the same folder hold CTRL key and click each file you want to select.
- Once you have selected all of the files or folders that you want to archive, right-click your mouse, select (or point to) Send to, and then select Compressed (zipped) folder. New archive will be created in the same directory you are currently located.
- You might want to rename your new archive. To rename the created file, right-click the zip file (archive), select Rename, and then type in the new name.
Step 2 — Unzipping files or folder
Using Extract All feature
Extracting zip archive on Windows is easy:
- To unzip (unarchive) files or folder navigate the folder containing the archive.
- Right click the mouse button and select Extract All.
Extracting files with Windows Explorer
On some Windows versions Extract All feature cannot be accessed from the context menu. In this case, you can use Windows Explorer:
- Access files or folder you want to unzip.
- Right click the mouse button and choose Open With –> Windows Explorer
- A new Windows Explorer window will open. Select files you want to extract and simply drag them to a different folder.