I would like to request a new feature for FreeCommanderXE’s Favorite Tools system, specifically for users who work with large file selections and external file processing.
Related Topics
This feature request topic might be related, but I didn't understand its concept, so I'm not sure: Folder List built with a script
Problem Summary
When using "%ActivSel%" or other list‑based macros inside a Favorite Tool command, FC expands the full list directly into the command line.
This works for small selections, but once the list becomes large (1000+), the expanded command exceeds the argument length limits of:
- Windows Terminal ("wt.exe")
- PowerShell ("pwsh.exe")
- Windows command line parsing
- FC’s own command construction
Code: Select all
The system cannot find the file specified.
The expanded parameter list cannot hold the entire list.
- truncated arguments
- broken pathnames
- commands failing to execute
- external scripts receiving incomplete or corrupted lists
Why This Happens
Windows Terminal and PowerShell both have strict limits on command length.
When FCXE expands "%ActivSel%" directly into the command line, the command often becomes too long, causing:
- WT to split or truncate the command
- PowerShell to misinterpret tokens
- external scripts to fail
However, FCXE could provide a built‑in solution.
1. Proposed Solution
1. Add a checkbox in Favorite Tool configuration:
“
When enabled:
- FCXE writes the full list to a temp file (UTF‑8, newline‑separated)
- FCXE exposes the temp filename via a new macro, for example:
Code: Select all
%SelListTempFile%
Dual Window Panes
Perhaps you need more than 1 macro to handle "Left"/"Right" and "Active"/"Inactive" windows too.
2. Alternative Implementation
The new macro itself ("%ActivSelTempFile%") being present on the command line could trigger the temp file to be generated, rather than adding a checkbox too.
This macro would behave like:
- "%ActivSel%" → expanded inline
- "%ActivSelTempFile%" → written to a temp file automatically
Benefits
- External tools receive the full list reliably
- No truncation
- No quoting issues
- No wt.exe/PowerShell argument parsing problems
- Works with thousands of files
- Works with long Unicode paths
- Works with any separator (comma, pipe, newline)
Summary of Requested Features
- Optional: Add a checkbox: “Write selection list to temp file”
- Add macro:
Code: Select all
%SelListTempFile%