Raw Transfer Settings

You can use raw transfer settings to setup rare advanced transfer settings settings.

In scripting, use -rawtransfersettings switch (when the settings cannot be configured using dedicated scripting switch).

In .NET assembly, use TransferOptions.AddRawSettings method (when the settings cannot be configured using any dedicated property of TransferOptions class).


For both cases, you can just configure the advanced settings on Transfer Settings dialog and have WinSCP generate the code for you.

See also raw configuration and raw transfer settings.

Common Advanced Settings

Name Description Values
NewerOnly New and updated files only 0 = Off, 1 = On
FileNameCase File name case modification 0 = No change, 1 = Upper case, 2 = Lower case, 4 = Lower case 8.3
ReplaceInvalidChars Replace ‘\:*?’ 0 = Do not replace, 1 = replace with %XX, where the XX is a hexadecimal code of the invalid character, any other value = replace with the character specified by the option value (e.g. 95 for an underscore)
For list of characters to replace, see LocalInvalidChars.
LocalInvalidChars Characters to be replaced See ReplaceInvalidChars.
Defaults to /\:*?\"<>|.
IncludeFileMask File mask To be used with command-line operations only.
In scripting use the -filemask switch; in .NET assembly, use the TransferOptions.FileMask.
IgnorePermErrors Ignore permission errors 0 = Off, 1 = On
PreserveTimeDirs Preserve directory timestamps 0 = Off, 1 = On
ExcludeHiddenFiles Exclude hidden files 0 = Off, 1 = On
ExcludeEmptyDirectories Exclude empty directories 0 = Off, 1 = On
RemoveBOM Remove BOM and EOF marks 0 = Off, 1 = On
EncryptNewFiles Encrypt new files 0 = Off, 1 = On


Other Settings

To find correct syntax for settings not listed above, configure the transfer settings in the GUI, save configuration to an INI file and use the same syntax as you find the INI file.

Find the setting in [Configuration\Interface\CopyParam] section in the INI file.1


For example, to enable preserving of directory timestamps, in scripting:

put * -rawtransfersettings PreserveTimeDirs=1

or in .NET assembly (using PowerShell):

$transferOptions.AddRawSettings("PreserveTimeDirs", "1")
  1. Or HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Configuration\Interface\CopyParam key in a registryBack

Last modified: by martin