Topic "Tray icon when using script parameter"

Author Message
LupusGressus

Guest


Good evening everyone,

I was able to create a shortcut for WinSCP which opens my connection and keeps the two folders synchronized:
Code:
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="D:\log.log" /script="D:\script.txt"


And the script.txt contains the commands "open", "keepuptodate" and "exit" generated by the program.

My question is following:
Everytime I start the shortcut, the folders get synchronized, but I can't see the WinSCP program. I know its in the Task Manager of Windows, where I can shut it down, but is it possible to see an additional tray icon?
I get the tray icon, when I start WinSCP and the synchronization manually and minimize it, but I would prefer the automatic way.

Any suggestions?

Thank you very much!
Advertisements
JeroenE
[View user's profile]

Joined: 2014-02-13
Posts: 9
Location: The Netherlands
You have to use the /console parameter to see a window when you use winscp.exe.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25025
Location: Prague, Czechia
Correct, use the /console switch. If you have minimizing to tray enabled in GUI, the script console will use it too.

Or you can use the /rawconfig Interface\MinimizeToTray=1 command-line switch.
https://winscp.net/eng/docs/rawconfig

If you want to start minimized, put the command to a shortcut and set the shortcut Run parameter to Minimized.
LupusGressus

Guest


First of all, thank you very much for your help! <3
I finally managed to get what I want by adding the console-Parameter in the link and enabled the "minimize to tray"-function in the settings and changed it in the shortcut.

My final configuration (if anyone else has the same problem) is:

- Enable the "minize to tray"-option in the WinSCP settings
- The command of the shortcut is
Code:
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /console /log="D:\log.log" /script="D:\script.txt"

- set "run as minimized" in the shortcut

Once again, thank you very much! Smile
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License