Race condition/path mix-up when batch executing custom commands with similar filenames

Advertisement

lilhu
Joined:
Posts:
2

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).

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
43,052
Location:
Prague, Czechia

Re: Race condition/path mix-up when batch executing custom commands with similar filenames

First, please note that the files are paired simply by their order, not by their name. If that does not explain the mix-up, please post some screenshots documenting it.

Reply with quote

lilhu
Joined:
Posts:
2

Re: Race condition/path mix-up when batch executing custom commands with similar filenames

Thank you for the clarification regarding ordinal sequence pairing.

However, the issue occurs specifically within the "Compare Directories" (Shift+F2) checklist window:
  1. I perform a directory comparison (Shift+F2) to filter the modified files.
  2. The list visually shows aligned, matching filenames on both local and remote panels.
  3. When I select multiple files from this comparison list and execute the custom command, the parameters ! and !^! still dispatch incorrect pairings (a file gets compared with a different file in the batch).
It seems that the custom command dispatch mechanism loses track of the 1-to-1 ordinal mapping when triggered from the directory comparison checklist view.

Reply with quote

Advertisement

You can post new topics in this forum