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

martin

cag8f wrote:

Changing to winscp.exe improves it, but this time a Windows command prompt window is open during the process, instead of winscp.com.

But that has nothing to do with WinSCP.
Does your batch file do anything else apart from running WinSCP?
If not, skip the batch file and run WinSCP directly.
Otherwise, see https://superuser.com/q/62525/213663
cag8f

Whoops, sorry--I thought that line was part of your signature. Changing to winscp.exe improves it, but this time a Windows command prompt window is open during the process, instead of winscp.com. No worries, I think I can live with it or re-visit it if it becomes an issue. I read in another forum that if I schedule a Windows Task to run the BAT file on a regular basis, a window will not appear--I'll test that.

Thanks for the help.
cag8f

Ah of course, my mistake.
open
is used to open an SFTP connection. It is the statement in my BAT file:

"C:\Program Files (x86)\WinSCP\winscp.com" /script=htaccess-script.txt


that needs to be edited (if possible) so that winscp.com runs in the background. Any ideas how to do that off the top of your head?
martin

Re: Can I run the "open" command such that the window is not visible?

The open does not open any window. It's mere starting of the winscp.com that causes Windows to create a console window (as the winscp.com is a console application).

If you do not want the console window, use the winscp.exe instead:
https://winscp.net/eng/docs/executables
cag8f

Can I run the "open" command such that the window is not visible?

Hi all. I'm just getting started with WinSCP scripting, and have a question about the open command. When I run this command, it opens a visible WinSCP.com window. But is it possible to run this command such that the WinSCP.com window is not visible? I'd like to run a small script in the background that does not interfere/distract the user. The script downloads a small file via SFTP.

If this is not possible with open, might there be another approach I could take to achieve what I want?

Thanks in advance.