Hello,
It's perhaps easy for you, and i don't find right answer to his forum but :
When i select files, i just want to click a user button (or shortcut) and zip (*.zip or .7zip) this selected files ?
Do you have a tuto ?
Thank you,
Nicolas
Zip selected files to an user button
Re: Zip selected files to an user button
You can do zip files natively with the SC zip_add() command, you can paste the following into the XY address bar for more information if you are interested:
And for info on adding a custom toolbar button: https://www.xyplorer.com/release_8.40.php#ctb
Also if you just add #281; in the on left click field of a custom button it will prompt you for a zip filename to add the selected files to without having to customize it via scripting command I suggested previously.
If you want it to be a shortcut key instead, press the Jump button in the bottom of this dialog, https://www.xyplorer.com/highlights.php#cks
and type 281 and assign that "Add to Zip" function to a keyboard shortcut.
For 7z you will have to use the command line version of 7z, reply if you want an example of that.
Code: Select all
::help "idh_scripting_comref.htm#idh_sc_zip_add";
Also if you just add #281; in the on left click field of a custom button it will prompt you for a zip filename to add the selected files to without having to customize it via scripting command I suggested previously.
If you want it to be a shortcut key instead, press the Jump button in the bottom of this dialog, https://www.xyplorer.com/highlights.php#cks
and type 281 and assign that "Add to Zip" function to a keyboard shortcut.
For 7z you will have to use the command line version of 7z, reply if you want an example of that.
Re: Zip selected files to an user button
Thanks for the tips here jupe, very helpful. After reading this, I added a custom button w/#281 as the left click. I selected several files by CTRL+LEFTCLICKING them, clicked the toolbar button, the dialog popped up and I created the ZIP - very easy. However, when I selected the files by dragging the mouse over them and then clicking the custom toolbar button, nothing happens - no prompt for a filename. Not sure if this is intended or not as I am still experimenting with CTBs.
Re: Zip selected files to an user button
I have the same behavior, seems like a bug.
The menu "File → File Special → Add to Zip" has no action when using the lasso selection or Ctrl+A.
The menu "File → File Special → Add to Zip" has no action when using the lasso selection or Ctrl+A.
Re: Zip selected files to an user button
Something strange is going on with the selection and using the that CTB, but it probably has nothing to do with the assigned CTB. I say strange because initially I could mouse select and and properly invoke the CTB, but then I couldn't. I haven't been able to nail down what conditions have changed to cause it not to work. When I restart XYplorer it works one time then it doesn't anymore on any subsequent attempts - if that helps anyone - using Windows 10 1803.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440
Re: Zip selected files to an user button
Sorry guys, if you replace #281; with just zip_add(); it should work in the meantime and perform the same function until what seems like it could be a bug gets fixed.
Re: Zip selected files to an user button
Thank you Jupe, i add keyshortcut to File Special, Add to Zip !
-
- Site Admin
- Posts: 60541
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Zip selected files to an user button
Bug confirmed (not a new bug AFAIK, looks like it has been there for a long time). Fix coming...
FAQ | XY News RSS | XY Twitter
Re: Zip selected files to an user button
It's working consistently now.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440