Hide winscp.com console window

Advertisement

Belfigor
Guest

Hide winscp.com console window

Hi, trying to use winscp to downloading files from ftp every hour, while user is working on computer

using bat:
@echo off
winscp.com /ini=nul /script=update.txt > log.txt

update.txt:
open ftp://qweqwe:qweqwe@localhost/
# Upload file
get /ZUP.exe C:\temp\ZUP.exe
# Exit WinSCP
exit

Testing on my computer. But I cannot hide console window, it is pops up every time when winscp is called and then hides after 2-3 seconds if it connects to ftp normaly, and after 10 seconds if ftp server is offline. Users will be mad if they will see blinking windows every hour :(

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Hide winscp.com console window

You can use winscp.exe instead of winscp.com, if you do not want WinSCP to open console window.
https://winscp.net/eng/docs/executables

But in your case, winscp.com only inherits a console window on the parent batch file (cmd.exe). So it won't help. You have to hide a console window of the batch file in the first place.
See https://superuser.com/q/62525/213663

Or you can avoid using the batch file, as it contains one command only anyway. Instead, run winscp.exe directly. Though then you won't be able to use output redirection.

Reply with quote

Advertisement

You can post new topics in this forum