I am looking to:
1. Select multiple folders, right click on one of them, select a menu item to activate a script (Done)
2. The script (I am using Python, but it does not have to be) pops up an input screen where options on what to do on these folders is selected.
3. All the folders are processed based on the user selected options in #2.
#1 is done, but #2 is an issue In standard Windows explorer: #1 sends individual folders to the script all in individual (separate) processes, so if I have 10 folders selected, I get 10 popups asking for user input. What I need is a single popup in #2, and all the folders processed based on the user input from that popup.
Any suggestions on how XYplorer can handle this?
Right click multiple folder list to a script
-
highend
- Posts: 14942
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Right click multiple folder list to a script
It's not XY task to handle this, it's the script's task. XY doesn't control user defined context menus. So how is this context menu implemented?
One of my scripts helped you out? Please donate via Paypal
-
Imagine
- Posts: 8
- Joined: 03 Feb 2015 18:37
Re: Right click multiple folder list to a script
It is done by adding a registry key to add a right click menu item and send the output to the script as argv[1].
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Right click multiple folder list to a script
Add a new POM (Tools->Customize File Associations) entry like this:which will pass |-separated list of selected folders (full paths) as argv[1] to your script.
You need to choose "Open With" in XYplorer's context menu -> "pass folder-selection to script".
But what are you going to do in your script. Maybe that can be done entirely inside XYplorer.
Code: Select all
|"pass folder-selection to script"\>::run """path\to\script.py"" ""<get selectedItemsPathNames |>""";You need to choose "Open With" in XYplorer's context menu -> "pass folder-selection to script".
But what are you going to do in your script. Maybe that can be done entirely inside XYplorer.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
Imagine
- Posts: 8
- Joined: 03 Feb 2015 18:37
Re: Right click multiple folder list to a script
Thanks Sammay.
I added the code to Tools->Customize File Associations as a New entry. (See the attachment below showing Screen Capture of POM settings)
When I select a folder (or folders), right clicking does not bring up the option "Open with". Even with files, the open with option shows ip only when a single file is selected, and the custom script added does not show as one of the options.
I added the code to Tools->Customize File Associations as a New entry. (See the attachment below showing Screen Capture of POM settings)
When I select a folder (or folders), right clicking does not bring up the option "Open with". Even with files, the open with option shows ip only when a single file is selected, and the custom script added does not show as one of the options.
To see the attached files, you need to log into the forum.
-
RalphM
- Posts: 2089
- Joined: 27 Jan 2005 23:38
- Location: Cairns, Australia
Re: Right click multiple folder list to a script
PFA's don't change the Windows context menu or Open With menu but are accessible via XY's own "Open With" button.
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%)
-
Imagine
- Posts: 8
- Joined: 03 Feb 2015 18:37
Re: Right click multiple folder list to a script
That works great! Thanks for your OUTSTANDING support (and great features!)
XYplorer Beta Club