Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

roofwoof

Re: Open file on server in external editor via WinSCP CLI

Thank you too, Martin!
martin

Re: Open file on server in external editor via WinSCP CLI

Thanks for your suggestions. We will see, if more people ask for this.
roofwoof

Re: Open file on server in external editor via WinSCP CLI

Okay, I understood the problem. Maybe it is possible to run session in command line or just run the GUI and open files in its session? I understand that it is a bit complicated to implement.
martin

Re: Open file on server in external editor via WinSCP CLI

When you open the editor in GUI, you control, when the connection is closed by the WinSCP GUI.
But if you open an external editor from commandline, there won't be any WinSCP GUI. How would you tell WinSCP to close the connection?
roofwoof

Re: Open file on server in external editor via WinSCP CLI

When you use WinSCP GUI and open the file WinSCP saves it to temporary directory, then runs external editor to open this file.
Why can't it be implemented in CLI?
martin

Re: Open file on server in external editor via WinSCP CLI

Indeed, the /edit opens an internal editor:
https://winscp.net/eng/docs/commandline#edit
You cannot open an external editor from WinSCP commandline.
If you want this, how would you imagine this working? With no WinSCP GUI?
roofwoof

Open file on server in external editor via WinSCP CLI

Hello!
I have two files on server (SSH-connection). I'm usually open WinSCP GUI-client and open them in Brackets. I configured the Editor preference table in such way that WinSCP opens HTML, CSS and JS files via Brackets. Now I want to automatize this actions using batch or PowerShell script. I want to open WinSCP GUI and open two files in Brackets via batch script. So I wrote the batch-code below:
start winscp.exe <session_name>
winscp.exe <session_name> /edit <path>/my_styles.css
winscp.exe <session_name> /edit <path>/my_script.js

But WinSCP opens these files via internal editor. How can I configure the editor in CLI?