ZIP files are necessary for combining multiple files together into one downloadable file. You can get many files in one lump while also compressing the file to allow for a quicker download. This has become a necessary method of downloading portable files for USB or other uses. While it's necessary to unzip these files with a tool like WinRAR or 7-Zip, it always must be done manually. Today, however, we'll look at how to set up a few things to automatically unzip a compressed file so you can get to the files within in much quicker.
The steps necessary to automatically unzip ZIP files is to run a batch file that uses 7-Zip against a download location so it extracts the contents and then discards the original ZIP file. This is done with a folder monitoring software. While these steps may seem daunting at first, they are simply using versatile utilities that must be adapted for this project, and therefore must be precise.
Walk through these step by step and you'll have no problem setting it up.
Unarchiver is a very popular solution to open all sorts of archive formats on a Mac, it has been discussed here before as an alternate when you need to open and unrar RAR files in Mac OS X as well, and it can basically open any imaginable archive format you may come across whether it's 7z, zip, sit, tgz, tar, gz, rar, bzip, hqx, and much more, and whether or not it's arriving from a. In the menu bar, go Safari - Preferences. In the 'General' tab, uncheck 'Open 'safe' files after downloading'. This will stop Safari from automatically unzipping the. If you would rather Safari just download the.zip file and leave if for you to decide what to do: Open Safari; Click Preferences; Under the General tab, uncheck the option Open 'safe' files after downloading.
Set Up 7-Zip
7-Zip is necessary for using the command line operations of its extraction capabilities.
Step 1: Install 7-Zip from this link here.
Step 2: Open the System Properties by right-clicking Computer from the Start menu and choosing Properties.
Step 3: Click Advanced system settings from the left pane. This will open the System Properties window.
Step 4: Click the Advanced tab and then choose Environment Variables.
Step 5: Double-click the variable called PATH and enter a semicolon at the end of the value. Immediately following the semicolon, enter the path to the 7-zip installation directory. The path in this example is C:Program Files7-Zip, but yours may be slightly different.
Ensure to OK out of all the open windows to save the variable change. This step is necessary for when we call the 7-Zip program from the command line.
Create a Batch File that Extracts a ZIP File Using 7-Zip
Now that 7-Zip has been installed, it's necessary to create a small program that will extract any ZIP file in a certain folder.
Before starting, it's important to note where your downloads go. Whether you're using Chrome, Firefox, Internet Explorer, etc., every downloaded file is either automatically sent to a certain folder or the browser asks you where the download should go.
Cool Tip:Visit this link for a few download managers you can use in Chrome.If the downloads go to the same folder every time, identify this folder and jot it down. If you choose where every downloaded file will go, simply ensure you choose a common one and then use that location in the below command.
Step 1: Open Notepad and enter the following for the first line:
7z x –oDOWNLOAD-LOCATION* EXTRACT-LOCATION*.zipFor example, this is what my first line of commands is:
7z x -oC:UsersJonDownloadsDownloadedFiles* C:UsersJonDownloadsDownloadedFiles*.zipNote: There is not a space after the command 7z x –o and before the DOWNLOAD-LOCATION section. There also cannot be any spaces in the pathname to the downloads folder.At this point, when the batch file runs, any ZIP file in the downloads folder will extract automatically and land in a folder in the same directory with the same name as the compressed file. However, the original ZIP file still remains. This is unnecessary and may even cause issues when we move on to the remaining steps. Therefore, we must include a command to either remove the ZIP file or move it out of the way and into its own folder.
Step 2: If you'd like to move the downloaded ZIP to another folder, create a folder called ZIP-Originals and place it in your downloads folder.
Step 3: Add the following under the existing commands in Notepad:
move DOWNLOAD-LOCATION*.zip DOWNLOAD-LOCATIONZIP-OriginalsThis is what mine ends up as:
move C:UsersJonDownloadsDownloadedFiles*.zip C:UsersJonDownloadsDownloadedFilesZIP-OriginalsAlternatively, if you'd like to simply remove the downloaded ZIP file, use this command instead:
del DOWNLOAD-LOCATION*.zipStep 4: Save this file anywhere as one with a .bat extension under the All Files file type.
Run the Batch File When a ZIP File is Downloaded
To automatically run a batch file upon the criteria of a new download, it's necessary to use a program called Directory Monitor.
Step 1: Download Directory Monitor from this link here.
Cool Tip: Learn how Watch 4 Folder can also monitor folder activity.Step 2: Open the program and choose the three small dots to browse for a download directory.
Find the folder and click the Select Folder button.
Step 3: Right-click the newly added directory and click Edit.
Step 4: Ensure the New Files checkbox is checked under the Events and Options section. Move down a bit further under Execute Applications to browse for the batch file you created in Step 4 above. Next to Only execute, enter a small number like 3 or 5 so the batch file is sure to run only when the file has been completely downloaded.
Step 5: Return to the main menu after saving the changes and open File > Options.
Choose to load the program at system start and then add .zip as a global include pattern in the bottom right text area. This ensures that ZIP files are included in the criteria to launch the batch file.
Note: ZIP files aren't the only file types 7-Zip can handle. Therefore, if you would like to set these steps up with a RAR, 7Z, DMG, etc. compressed file, simply change every instance of ZIP with the preferred extension type.Conclusion
Extracting ZIP files shortly after download without intervening in the process will surely make using the files that much quicker. The task is fully automatic and can be left alone after setting it up.
The above article may contain affiliate links which help support Guiding Tech. However, it does not affect our editorial integrity. The content remains unbiased and authentic.Also See#Download #Software
Did You Know
You can ask Google Home and Amazon Alexa to make to-do lists
More in Windows
Top 3 Fixes for Camera Not Working on Windows 10 PC
Sep 28, 2020 • Filed to: Solve Mac Problems • Proven solutions
When Phil Katz invented the Zip file format over 30 years ago, it's highly arguable if he ever imagined his invention would see such profound and widespread use. Zipping files for Mac entails you take several files and compress them into a single file, all the while reducing the overall size of the resultant single file. How convenient is that?
Knowing how to Zip or Unzip files for Mac should thus be a prerequisite for you. If you don't know how to go about doing it, have a look below for an extensive lesson.
Unzip Files Apple
Part 1: What Is a Zip File on Mac
Zip is simply a data archive and compression format. Rar is very similar to the Zip but they are quite different too. For one, Zip files were invented long before Rar, meaning there are more software out there capable of opening and decompressing Zip files because it is a standard file format.
Along the same vein, compatibility is also a difference. Because the Zip format is older, both Windows and Mac come pre-installed with software that is capable of opening it. The same can't be said for the Rar format because it often requires third-party software to be opened. The Zip file format is a free and open-source, making it more popular. Thus, the majority of users have software that can open Zip files primarily. And when it comes to the archive creation process, its speed is relatively faster than that of the Rar format.
Zip files are well and truly capable of saving over 80% or more of the space in your Mac's hard drive. Do you now see the marked difference between the two formats?
Part 2: How to Zip a File on Mac for Free
You might ask yourself if knowing how to create and open Zip files are really worth taking the time out to know. Well, ask yourself these questions too: Don't you want to reduce email-transmission time? And wouldn't it be great to save many emails despite your mailbox's space limit? What about the time it takes to upload or download files via the web?
Zipping a file on Mac gives you great solutions to these questions. It uses a native tool called 'Archive Utility' that does the job for you. There are several ways to the Zip file on Mac. Some are free but there are paid options too (third-party software). Only the free solutions will be given out to you today, though. You're welcome.
How to Zip a File on Mac
1. Open a Finder window, then locate the file or folder you want to zip.
2. Right-click on the said file or folder.
3. Select 'Compress' in the drop-down menu you see. The file is then Zipped while the original is left just the way it was.
How to Create Zip Files and Folder on Mac
1. Open a Finder window.
2. Make a folder for the file or files you want to Zip.
3. Highlight the newly-created folder.
4. Click on 'File' in the top menu bar.
5. In the drop-down menu that appears, click on 'Compress.' A zip file will be created in the same directory as the original folder.
How to Zip Files Using Mac Terminal
You can Zip your files in Mac's Terminal in different ways, but the simplest method will be outlined here for you.
1. Open up a Finder window.
2. Open up Terminal by typing in 'Terminal' at the search bar located on the top right part of your screen.
You can also launch Terminal from your Mac's 'Applications/Utilities' folder.
3. Either way, you will see the program. Click on it to launch it. What is the best free movie editing software.
4. If the Zipped file is not located on your desktop, move it to the desktop (it's more convenient in this way).
5. Type this command in the Terminal and leave a space: zip
6. Drag and drop the file (s) to be Zipped into the Terminal's window.
7. Press 'Enter/Return'. The files will be compressed and Zipped into a single file.
How to Zip Files with Password on Mac
1. Choose the file you want to Zip and right-click on it (to make it easier, make sure the file is on your desktop).
2. Select 'Compress.'
3. Open up a Finder window.
4. Navigate to your Mac's 'Utilities.'
5. Find and click on 'Terminal' to launch it.
6. Type in these commands in the Terminal: zip -er archive_name target_folder
7. A popup window will appear, prompting you to enter a password (you will have to enter the password twice; the second time will be for verification). Type in the secure password and click on 'OK' or press 'Enter/Return.' Your Zipped files are now password-protected.
Apple Mac Unzip Rar File
Part 3: How to Unzip and Open Files on Mac for Free
Knowing how to zip files on Mac is good and fine but sometimes, the files you want are already Zipped. This is especially true if you downloaded the files from the web.
The internet of yesterday is not the same as the internet of today. More and more of the files uploaded to websites come in Zipped formats to make downloads faster and easier. So, what happens when youdownload these files but don't know your way around opening them? Bummer. That is just one reason why knowing how to open zip files on your Mac is now a necessity. But just like Zipping files, Unzipping them is quite easy too. There are, of course, different ways you can do that. Here are a few:
How to Unzip files on Mac
Method 1 (Archive Utility):
1. Navigate to wherever the Zipped file is (your desktop, downloads, etc.)
2. Double-click on the file. Because 'Archive Utility' is integrated into your macOS, the Zipped file will automatically open up and dump the contents into a folder bearing its name; the folder will be in the same directory as the Zipped file too.
Method 2 (Archive Utility):
1. Move your cursor over to the Zipped file or files and select them.
2. Right-click on them.
3. Select 'Open.' The Zipped archive will be extracted into a folder that's in the same directory as the archive.
Method 3 (Terminal):
1. Open up a Finder window.
2. Launch Terminal by typing in 'Terminal' at the search bar on the top-right section of your Mac's screen. Click on it to launch it.
3. Type this command in the Terminal: unzip {the name of the Zipped file}.zip
4. If the Zipped file is not located on your desktop, move it to the desktop because it makes things easier and faster for you. This is not necessary but it is advised, or else you have to type in the directory of the Zipped file before typing in its name. Like so:
unzip ~/Downloads/example.zip
5. Press on 'Enter/Return'. The contents of the Zipped file or files will be Unzipped to the same directory as the Zipped file.
Method 4 (Terminal)
You can Unzip multiple files all at once into a single directory using Terminal.
1. Open up 'Spotlight.'
2. Type in 'Terminal' and then launch it.
3. Type the following commands in Terminal:
cd /Users/phil/Downloads/folder_with_zips
(The above command is to navigate to where your multiple Zipped files are. Input the right directory as proper. In the above example, the Zipped files are in 'Downloads').
unzip *.zip
(This is the command that will Unzip the multiple files)
4. Press 'Enter/Return.' All the files will be Unzipped simultaneously.
Part 4: How to Recover Deleted Zip Files on Mac
4. Press 'Enter/Return.' All the files will be Unzipped simultaneously.
Part 4: How to Recover Deleted Zip Files on Mac
Try as you may, it's almost impossible for you to use your Mac without Zipping your files for one reason or another. Even if you don't download much from the internet, it can be quite tempting to want to Zip your files simply because you're well aware it will save your hard drive much-needed space.
Likewise, it will be nearly impossible for you to not delete your Zipped files; again, for several reasons. Maybe you didn't do it intentionally, or maybe you did, but then you realize you want the Zipped files back for one or various reasons.
Look no further than Recoverit Mac Data Recovery to be your one and only savior. It comes loaded with features that thoroughly scan your drive for deleted Zipped files and recovers them back to their exact state. And this is all achieved with a few simple steps:
Step 1: Choose a Location
- Open up Recoverit and choose the hard disk to be scanned. The disk should be where the deleted Zipped files had once been in. Click the 'Start' button.
Step 2: Scan the Location
- The scan will begin. After it's done, a window will display a preview of the deleted Zipped files. You can select and deselect filters during the scan to make your search quicker.
For instance, you can use 'File Type' or 'File Path' to alter your search and make judicious use of time. You can pause or stop the scan before it completes too; that's a feature that easily makes the operation even more convenient, wouldn't you agree?
Step 3: Preview & Recover Data
- A window will open up where you will see a preview of the deleted Zipped files to be recovered. Choose the files.
- Click on the 'Recover' button located below and to the right. Your Zipped files will be recovered.
- As a final note, you are advised to save the recovered ZIPPED files in a secondary location and not the one they were initially deleted from.
Isn't Recoverit Mac Data Recovery the most user-friendly software you've seen? The three steps are so simple even a child could do it: Choose a drive, scan it, preview your files, and recover them.
Part 5: How to Fix Zip File on Mac
There are those rare but alarming situations when your Zipped files get corrupted. This is an unavoidable flaw on computers. Fortunately, it's fixable.
As to why the Zipped file got corrupted in the first place, it's possible the files within the Zip were already damaged; or an error occurred while downloading the file from the web. Below are common errors plaquing Zip files.
Unable To Expand Zip File on Mac - This error is mostly caused by an unstable internet connection. If your network keeps going on and off while you're downloading a Zipped file, the end result could be a corrupted archive.
The problem could also stem from you, the user. You might have been too hasty in closing the web browser while the Zipped file was still downloading, consequently corrupting it.
Sometimes, even if you manage to completely download the Zipped file, don't be surprised to learn it's few megabytes short of the size it's supposed to be. Because of those missing megabytes, your entire Zipped file could be corrupted.
The Archive is Corrupted – Believe it or not, even exposing your Mac to magnetic fields or excessive temperatures and mechanical problems could also corrupt a Zipped file. Likewise, unzipping very large files can also corrupt them.
End-of-Central-Directory Signature Not Found – Here's another pervasive error. The probable reason you will see this error is because of the incomplete download of a Zipped file. Another possible reason is the file was one part of a multi-part archive, and the other components are missing.
All the same, the most important thing for you here is to know how to repair corrupted Zipped files, isn't it? These errors can be fixed via Terminal or any decompression utility software, which of course will be a third-party software:
Method 1 (Terminal):
1. Launch Terminal on your Mac.
Apple Unzip File Folder
2. Type this command in the Terminal: unzip ~/Downloads/example.zip
(Replace the 'Downloads' you see in the above example with the directory of your Zipped file. If it's in your Downloads folder too, then leave the command as it is.
Method 2 (Unarchiver):
1. Go to your Mac App Store, download Unarchiver, and install it.
2. Open it.
3. Drag your files into the square, blank space on the left side of the software.
4. Click on 'Decompress.' Your files will be extracted. This software can even succeed where Terminal fails.
Closing Words
By now, you should fully agree with the infinite Mac users out there and on how significant Zip files are. No more are they deemed less important than other software. Indeed, the majority of websites hosting files do so with the files being Zipped.
What's more, you don't have to worry about the state of your Zipped files and the multitude of important files you have within them because of what Recoverit Mac Data Recovery can do for you. This software can be something of an 'insurance' for your Zipped files. If anything befalls them, Recoverit will be there to help recover ZIP and RAR files.
What's Wrong with Mac
- Recover Your Mac
- Fix Your Mac
- Delete Your Mac
- Learn Mac Hacks