I zip folders during the course of the day and use WinZip from the context menus to zip the folder using the folder name as the zip filename. The problem I have is that from WinZip, you can only zip one folder at a time in this manner. I would kill for method of selecting a group of folders and having a way to zip them all into separate files using the folder name as the respective zip filename.
Since this doesn't exist and I've not found any way to do this, I was wondering if there is a way to use a XYplorer script as a means to accomplish this. Then all I would have to do is select the folder or group of folders and click on a user button and have them zipped. I looked at the scripting language but couldn't find a way to do this. Can you help me to create a script or point me to something that was already done?
Thanks
How to make a custom Zip button on XYplorer menu
-
zer0
- Posts: 2676
- Joined: 19 Jan 2009 20:11
Re: How to make a custom Zip button on XYplorer menu
Do you need someone to write you such a script or give pointers so that you can attempt to do it yourself with a bit of guidance?
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
-
admin
- Site Admin
- Posts: 66249
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: How to make a custom Zip button on XYplorer menu
Here is a solution using UDCs (User Defined Commands) with WinZip. Here are the caption and the critical line to save you some typing:
UPDATE 1: add the -r switch to recurse subfolders:
UPDATE 2: with the latest BETA (v9.90.0101) you should use <title> instead of <base>:
Note the Mode setting (multiple instances!)!
To trigger the UDC select menu User / Open With / Add each selected item to separate archive (WinZip).
Code: Select all
Add each selected item to separate archive (WinZip)
"winzip32" -a "Zipped_Folder_<base>.zip" <items>Code: Select all
"winzip32" -a -r "Zipped_Folder_<base>.zip" <items>Code: Select all
"winzip32" -a -r "Zipped_Folder_<title>.zip" <items>To see the attached files, you need to log into the forum.
FAQ | XY News RSS | XY X
-
alank
- Posts: 4
- Joined: 24 Jan 2011 17:27
Re: How to make a custom Zip button on XYplorer menu
The user deffined command works fine, however I want to run this from a menu button. Entering the same winzip32 statement in a script brings an error on the -a parameter.
Thanks
Thanks
-
admin
- Site Admin
- Posts: 66249
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: How to make a custom Zip button on XYplorer menu
menu button?? You can create a User Button that calls this UDC. Is that what you mean?alank wrote:The user deffined command works fine, however I want to run this from a menu button. Entering the same winzip32 statement in a script brings an error on the -a parameter.
Thanks
FAQ | XY News RSS | XY X
-
admin
- Site Admin
- Posts: 66249
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: How to make a custom Zip button on XYplorer menu
Now, did you start the killing? I did not hear any screams yet...alank wrote:I would kill for method of selecting a group of folders and having a way to zip them all into separate files using the folder name as the respective zip filename.
FAQ | XY News RSS | XY X
-
alank
- Posts: 4
- Joined: 24 Jan 2011 17:27
Re: How to make a custom Zip button on XYplorer menu
I'll have to take back what I said about having this working. I am using Winzip 15 which uses the command line aplication named wzzip.exe. Anyway the command line to zip folders is:
"wzzip.exe" -p -r (zip file name)
Using the statement "wzzip" -r -p "<base>.zip" does not work. I'm not shure what occurs since the screen flashes but this does work in a batch file.
Thanks
"wzzip.exe" -p -r (zip file name)
Using the statement "wzzip" -r -p "<base>.zip" does not work. I'm not shure what occurs since the screen flashes but this does work in a batch file.
Thanks
-
RalphM
- Posts: 2089
- Joined: 27 Jan 2005 23:38
- Location: Cairns, Australia
Re: How to make a custom Zip button on XYplorer menu
Maybe you should reread Don's post above, especially the 2nd edit and in general it helps to state OS and XY versions used to get the best help in this forum.
Ralph 
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
-
alank
- Posts: 4
- Joined: 24 Jan 2011 17:27
Re: How to make a custom Zip button on XYplorer menu
I'm using Windows 7, Winzip 15, XYplorer 9.5.
-
zer0
- Posts: 2676
- Joined: 19 Jan 2009 20:11
Re: How to make a custom Zip button on XYplorer menu
You should be using at least v9.90.0101. Also, please take a look at how parameters are supposed to be used in that version of WinZip and bear in mind that single/double quotes make a big difference.alank wrote:I'm using Windows 7, Winzip 15, XYplorer 9.5.
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
XYplorer Beta Club