!& isn't retrieving remote files for Custom Command

Advertisement

Bill_Fields
Joined:
Posts:
4
Location:
Portland, OR

!& isn't retrieving remote files for Custom Command

Hello,

I've got the following custom command:

cmd.exe /c cd C:\Users\bfields\AppData\Local\Temp\!N!/ & start "" "C:\Program Files (x86)\Beyond Compare 4\BComp.exe" !& & timeout /t 6

When I capture the command with Ctrl+Shift, the results are as expected, but when I view the temp folder that WinSCP should be placing the remote files into, they're not there.

If I manually edit each file, they get downloaded to the temp folder I'm expecting them to be in, then if I execute the custom command again, then Beyond Compare opens the files like it should have in the first place.

I have "Local command" and "Use remote files" selected in the custom command configuration.

Why aren't the remote files indicated by !& retrieved before executing the remote command?

Thanks
Bill

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,506
Location:
Prague, Czechia

Re: !& isn't retrieving remote files for Custom Command

It's misunderstanding. The Use remote files means that the files won't be downloaded. It just makes WinSCP pass paths (or just names in case of !&) to the custom command. And it's up to the command to download the files on its own (if it needs the contents).
See https://winscp.net/eng/docs/ui_customcommand

You probably only need to uncheck the Use remote files to get what you need.

Reply with quote

Advertisement

You can post new topics in this forum