Script it in whatever you like. The explorer plays along.
There is no built-in scripting language to learn. Write your script in PowerShell, Python, a .bat file or AutoHotkey – MagnumOpus runs it over the selection, takes orders from it through mo --cmd and shows the files it found as a result tab.
Your programs and scripts over the selection
Settings > User commands holds your own commands: a program, arguments with tokens such as {file}, {files}, {dir}, {dest} (the folder of the other pane) or {name}, a working folder and a file mask. They run from the command palette, the context menu and the keys User command 1–9.
- Run once for all files, or for each file separately with at most N at once.
- Output: nothing, a notification, a live output window, or a list of files that becomes a result tab.
{filelist}passes hundreds of paths in a temporary file,{input}asks for a text first – a search term for ripgrep, say.- Refresh the folder when done, ask before running.
Everything runs in the background. A command running longer than a second shows in the jobs panel, and its cross stops it including child processes.
A command line under the panels, like in Total Commander
Type a command and it runs in the current folder with cmd, Windows PowerShell or PowerShell 7. cd <folder>, cd .., cd - or D: navigate the active panel. Ctrl+Enter inserts the name of the item under the cursor, Ctrl+Shift+Enter its full path, and Up / Down browse the last 200 commands.
Enter opens a terminal window that stays open. With Command output set to Capture output, the command runs hidden: a short output arrives as a notification, a longer one in the output window. Shift+Enter always opens a terminal.
Drive the running window from a script
--cmd <id> runs any command palette command in the running window. Several commands run in the given order and each one waits until the previous one is done – folder loaded, dialog closed, copying finished. mo.exe, a small console launcher, adds --wait and returns an exit code.
mo C:\Projects\aurora --cmd pane.split-right=D:\Backups\aurora --cmd view.sort=date:desc --wait
The IDs are a stable interface: they are never renamed or removed. User commands run as user:<name>, workspaces as workspace:<name>.
Script output as a result tab
mo --results <file> – or --results - from a pipe – shows a list of paths as a tab "Result:
rg --files-with-matches FIXME C:\Projects | mo --results - --title "FIXME in projects"
One path per line, UTF-8 or UTF-16 (PowerShell Out-File too). path<TAB>note adds a Note column, for example the matching line from ripgrep. Items appear while the list is being read, F5 reads it again.
Speed tests of the beta (cargo xtask perf) on the developer's machine, release build.
--select, --split, --view, --sort, --filter, --search – for shortcuts and scripts./L=, /R=, /T, /O, /N and Explorer's /select, work, so existing shortcuts keep working.--list-commands and --list-windows, also as JSON with --json. The app does not even have to run for the first.mo.exe --wait returns 0 when done and a specific code for a failure, timeout, cancel or unknown command.MO_DIR, MO_DEST, MO_WINDOW and MO_CLI, so a script can control the window it came from.mo.exe to PATH for your user.tools.find-duplicates, file.convert-images, file.compare-images, file.checksums and the other tools have IDs too.