|
|||||
|
Porn Users Forum » Bulk unzip batch file |
1-7 of 7 Posts | Page 1 |
Thread Nav : Refresh Page | First Post | Last Post | Porn Forum Home |
09-18-16 07:24am - 3017 days | Original Post - #1 | |
LPee23 (0)
Active User Posts: 399 Registered: Jul 14, '13 Location: USA |
Bulk unzip batch file I wanted to share this Windows batch file that I wrote for bulk unzip. It will unzip all zip files in a directory tree and place the unzipped files in the same folder as the zip file. This can save you hours if you download lots of zip files. for /R "%HOMEPATH%\Downloads\" %%I in ("*.zip") do ( "%ProgramFiles%\7-Zip\7za.exe" x -y -o"%%~dpI" "%%~fI" ) You just need to install 7-zip and confirm that the 7za.exe file is in the path %ProgramFiles%\7-Zip\. You can change %HOMEPATH%\Downloads\ to any directory you like. You can also change *.zip to any extension supported by 7-zip. For example: for /R "C:\Users\Username\Documents\" %%I in ("*.7z") do ( "%ProgramFiles%\7-Zip\7za.exe" x -y -o"%%~dpI" "%%~fI" ) Just open notepad, paste in this text, and save it to a .bat file. Enjoy! Better to be pissed on, than to be pissed off. Edited on Sep 18, 2016, 07:31am | |
|
09-20-16 10:06pm - 3014 days | #2 | |
Toadsith (0)
Active User Posts: 936 Registered: Dec 07, '07 Location: USA |
That's pretty useful if you want to use 7-zip, thanks! I did want to point out that WinRAR can unzip large groupings of zip files simultaneously natively, but it is a program you have to purchase. "I'm not a number, I'm a free man!" Second Grand Order Poobah in the Loyal Order of the Water Buffalo | |
|
09-20-16 11:06pm - 3014 days | #3 | |
lk2fireone (0)
Active User Posts: 3,618 Registered: Nov 14, '08 Location: CA |
I bought WinRAR on 09/16/06 because I wanted a simple, easy to use unzip program. I'm glad I did, because it was simple, easy to use. There are free unzip programs available, but I liked WinRAR so much that I was willing to pay for it. And it's still working today. Which is lucky for me, I guess. Because many software companies go out of business. | |
|
09-20-16 11:45pm - 3014 days | #4 | |
lk2fireone (0)
Active User Posts: 3,618 Registered: Nov 14, '08 Location: CA |
Toadsith's post made me re-read the license file for WinRAR: "Home users may use their single computer usage license on all computers and mobile devices (USB drive, external hard drive, etc.) which are property of the license owner. Business users require one license per computer or mobile device on which the software is installed." So the license is pretty generous. They only require a single purchase for a home user, no matter how many computers he might have. Which is both generous and practical, because I doubt many home users would be willing to pay for a separate license for each computer he owns. Especially over time, when replacing a failing PC for a newer PC. | |
|
09-21-16 12:38pm - 3014 days | #5 | |
Toadsith (0)
Active User Posts: 936 Registered: Dec 07, '07 Location: USA |
That's good to know! I did buy WinRAR some years back for my desktop, but it would be nice to have it on my laptop. I just assumed I'd need a second license and hadn't gotten around to buying one. Now to find that original license though... "I'm not a number, I'm a free man!" Second Grand Order Poobah in the Loyal Order of the Water Buffalo | |
|
09-21-16 04:06pm - 3014 days | #6 | |
lk2fireone (0)
Active User Posts: 3,618 Registered: Nov 14, '08 Location: CA |
In one of the emails I got when I bought WinRAR, it states: Please remember that your registration keyfile is valid for the current and future versions of WinRAR. We recommend making a backup copy of your keyfile as soon as you receive it. Although we can recover lost keys, there may be a small charge and delay involved in recovering any lost keyfiles. I assume you registered WinRAR, because that was suggested with the purchase. And starting with WinRAR 3.0 (release date 2002-06-22), registration was automatic when you used the registration keyfile to get rid of the nag screen telling you to buy the product. So you should be able to contact WinRAR and request your lost key, for free or a small fee. Just give them your name and email address (the one you used for registration). Hope that helps. | |
|
11-05-16 01:38am - 2969 days | #7 | |
CharlieSkyward (0)
Suspended Posts: 16 Registered: Oct 25, '16 Location: UK |
On Mac or Linux, or the new bash command line that you can get on Windows, one can type: for s in *.zip; do unzip -d "${s%.zip}" "$s"; done which will take files [ Hello.zip, World.zip, Porn.zip, Lover.zip ] and extract each to folders [ Hello, World, Porn, Lover ] respectively. If you create the script file unzipToDir containing #!/bin/bash FILE="$1" DIRNAME="${FILE%.zip}" mkdir -p "$DIRNAME" && unzip -d "$DIRNAME" "$FILE" and then (provided it is in your path), can type ls -1 *.zip | xargs -n1 unzipToDir or ls -1 *.zip | tr "\n" "\000" | xargs -n1 unzipToDir if any filenames contain spaces. You can write more complete and idiot-proof scripts, for the addition of a few lines of flow control, if desired. (Personally I find the Windows command line painful compared to bash, and so use either cygwin or the new Ubuntu bash command line in Windows 10.) | |
|
1-7 of 7 Posts | Page 1 |
Thread Nav : Refresh Page | First Post | Last Post | Porn Forum Home |
|