Race condition/path mix-up when batch executing custom commands with similar filenames
When selecting multiple files with similar prefixes (e.g., inv_conf.html and investor_fin.html) to run a custom diff command using ! and !^!, WinSCP's background variable dispatch seems to suffer from a race condition or path mix-up. The external script often receives swapped or incorrect file paths.
Steps to reproduce:
Set up a local custom command using PowerShell to launch WinMerge with !^! and !.
Select multiple files with similar names in both panels (equal quantity).
Trigger the custom command.
Expected result: Each file pair should be mapped correctly.
Actual result: Paths are cross-contaminated (wrong files compared).
Steps to reproduce:
Set up a local custom command using PowerShell to launch WinMerge with !^! and !.
Select multiple files with similar names in both panels (equal quantity).
Trigger the custom command.
Expected result: Each file pair should be mapped correctly.
Actual result: Paths are cross-contaminated (wrong files compared).