Why the switches do not work in my script?

The switches for script commands were introduced in 4.1 beta. Some specific switches (such as -resumesupport, -filemask, -rawsettings, etc.) were introduced even later. Make sure you are using the latest version of WinSCP.

Older versions of WinSCP were not aware of switches, hence they treat them as regular parameters, mostly as names of files. As consequence you will be getting confusing errors such as:

  • File or folder '-delete' does not exist;
  • Too many parameters;
  • etc.

Advertisement

Last modified: by martin