This is an old revision of the document!

Executables winscp.exe and winscp.com

WinSCP has two executables:

  • winscp.exe: Main executable, supports both GUI and console operation;
  • winscp.com: Console interface tool, supports console operation only, allows input/output redirection.

Advertisement

This follows two basic executable types of Windows operation system, GUI and console.

Both executables are part of the installation package. Both are as well available for portable use.

winscp.exe

The EXE executable is the main one.

What you can do with it:

  • When run, it by default starts in GUI mode, showing Login dialog;
  • Using command-line options, it can be started in console mode;
  • It can be used to execute script without showing any window (by omitting /console parameter).

winscp.com

The COM executable is a simple tool that internally runs winscp.exe and provides console interface for it.

What you can do with it:

  • Supports console mode only, but allows input/output redirection;
  • When run from another console application (such as standard Windows console/command-line window, i.e. cmd.exe), it inherits its console1.
  • When run from Windows shell (i.e. cmd.exe or batch file), the shell waits for WinSCP to finish. So you can then check for WinSCP exit code.

The COM executable needs the EXE one to operate. It looks for it in the same directory, where it is located itself. The EXE must have exactly the same name.

Advertisement

Input/Output Redirection

For input/output redirection use standard operators;

  • > for output redirection;
  • < for input redirection;
  • | for piping.
  1. winscp.exe /console would pop up in new console window.Back

Last modified: by 165.127.87.82