-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeating N times an <exec> element when N files are selected. #181
Comments
More precision on how the "expansion" of the For example, when processing file
For reference, a property which contains the index of the processed file could also be defined. For the example above, the property |
@end2endzone hi, me reporting here. I'll copy/paste here what we discussed in #108 (comment)
Understood.. but I would think that usage of %* ( and of %1 %2 %3 ...) is kinda universal. Convenience is the key word. When you're writing long scripts and and long configuration files you just want
Understood, I'll comment and bookmark the issue.
Well.. is just quick and convenient. However, every programmer can decide how to offer and handle features. In the end, I believe the truly important thing it would be, to have the feature available and easy to implement.
Understood! —————————————————————————————— All that being said, I think the "repeat" attribute for this purpose would be a useful solution. IMPORTANT: PROCESS LOCKING AND/OR CONCURRENCY ? Locking the execution process is one thing to consider. Would the use of REPEAT lock the running process The way KuShellExt handles it is by locking the execution, so if I run ImageMagick to convert all PNG images Best regards! |
Is your feature request related to a problem? Please describe.
When multiple files are selected, one can
<exec>
element by setting selection.multi.separator property to" "
. See selection.multi.separator section, example 1.<file>
element and then executing this batch file. See selection.multi.separator section, example 2.In other words, ShellAnything allow processing a single
<exec>
element everytime. This is a limitation of the current implementation. It would be interesting to implement a mechanism that would process N times the<exec>
element when having selected N files.Describe the solution you'd like
One way to implement this feature would be to define a new attribute to the
<exec>
element. I think changing the default behavior through an attribute would be the easiest way to understand how the selection needs to be processed. If the attribute is well named, it could also be intuitive. The attribute would define if the exec element needs to process all files at once or one by one.For example, if one has selected the following picture files :
In the example above, assume one wants to to convert the images from CR2 format to JPG format. In such a scenario, it is more likely that a program is designed to convert a single image to another format. Image conversion programs are usually not designed to process multiple files all at once.
One could then define a special menu with an
<exec>
element to process each pictures individually such as :When the
repeat
attribute is set to a value that evaluates totrue
, ShellAnything would then "expand" the<exec>
element for each files allowing converting each file individually. This would result in something similar to the following:By default, the attribute
repeat
would be set tofalse
. This would be the default behavior since it is how previous versions are implemented.Describe alternatives you've considered
As stated previously and by other ShellAnything users, the current implementation is quite limited and a security concern when used to process multiple files.
Additional context
N/A
The text was updated successfully, but these errors were encountered: