Differences
This shows you the differences between the selected revisions of the page.
rawconfig 2017-02-10 | rawconfig 2024-08-25 (current) | ||
Line 2: | Line 2: | ||
You can use raw configuration to setup rare advanced global settings. | You can use raw configuration to setup rare advanced global settings. | ||
- | In [[scripting]] and with [[commandline#operations|command-line operations]], use ''[[commandline#configuration|/rawconfig]]'' parameter (when the settings cannot be configured using dedicated command-line parameter or scripting command). | + | In [[scripting]] and with [[commandline#operations|command-line operations]], use [[commandline#configuration|''/rawconfig'' parameter]] (when the settings cannot be configured using dedicated command-line parameter or scripting command). |
- | In [[library|.NET assembly]], use ''[[library_session_addrawconfiguration|Session.AddRawConfiguration]]'' method (when the settings cannot be configured using any dedicated property of ''[[library_session|Session]]'' class). | + | In [[library|.NET assembly]], use [[library_session_addrawconfiguration|''Session.AddRawConfiguration'' method]] (when the settings cannot be configured using any dedicated property of [[library_session|''Session'' class]]). |
+ | |||
+ | In GUI, for those low-level settings that do not have an equivalent GUI control, also use the [[commandline#configuration|''/rawconfig'' parameter]], when starting the GUI. You need to do this once once, the setting will be preserved. | ||
+ | |||
+ | See also [[rawsettings|raw site settings]] and [[rawtransfersettings|raw transfer settings]]. | ||
===== Common Advanced Settings ===== | ===== Common Advanced Settings ===== | ||
Line 10: | Line 14: | ||
^ Name ^ Description ^ Values ^ | ^ Name ^ Description ^ Values ^ | ||
| ''Interface\ExternalIpAddress'' | [[ui_pref_network|External IP address]] | | | | ''Interface\ExternalIpAddress'' | [[ui_pref_network|External IP address]] | | | ||
- | | ''Interface\KeepUpToDateChangeDelay'' | Upload delay after change is detected while [[task_keep_up_to_date|Keeping remote directory up to date]] | In milliseconds. | | + | | ''Interface\==LocalPortNumberMin=='' \\ ''Interface\LocalPortNumberMax'' | [[ui_pref_network|FTP active mode listening ports limits]] | | |
- | | ''Interface\CopyParam\NewerOnly'' | [[ui_transfer_custom#other|New and updated files only]] | ''0'' = Off, ''1'' = On | | + | | ''Interface\==SessionReopenAuto=='' | Delay of automatic reconnect of session that breaks during transfer. | In milliseconds. ''0'' = disable automatic reconnect| |
- | | ''Interface\CopyParam\FileNameCase'' | [[ui_transfer_custom|File name case modification]] | ''0'' = No change, ''1'' = Upper case, ''2'' = Lower case, ''4'' = Lower case 8.3 | | + | | ''Interface\SessionReopenAutoStall'' | [[ui_pref_resume#reconnect|Automatically reconnect session, if it stalls]] | ''0'' = do not reconnect, else a number of milliseconds before reconnect. | |
- | | ''Interface\CopyParam\ReplaceInvalidChars'' | [[ui_transfer_custom|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) | | + | | ''Interface\==KeepUpToDateChangeDelay=='' | Upload delay after change is detected while [[task_keep_up_to_date|Keeping remote directory up to date]] | In milliseconds. | |
- | | ''Interface\CopyParam\IncludeFileMask'' | [[ui_transfer_custom#other|File mask]] | To be used with [[commandline#operations|command-line operations]] only. \\ In scripting use the ''-filemask'' switch; in .NET assembly, use the [[library_transferoptions#filemask|TransferOptions.FileMask]]. | | + | | ''Interface\==MimeTypes=='' | MIME type (Content type) overrides. | Comma separated list of overrides with syntax ''mask=mime_type'', where ''mask'' is a [[file_mask|file mask]]. \\ Example: ''*.js=application/javascript,*.png=image/png'' | |
- | | ''Interface\LocalIconsByExt'' | Turn off loading icons from local files | ''0'' - Load icons from local files, ''1'' - Resolve icons for local files by file extension only | | + | | ''Interface\==QueueTransferLimitMax=='' | Limit of [[ui_pref_background#background_transfers|Maximal number of transfers at the same time]] | Defaults to 9. | |
- | | ''Interface\LocaleSafe'' | [[ui_pref_languages|Language]] | [[https://msdn.microsoft.com/en-us/library/cc233982.aspx|Decimal LCID]] of the language/locale. E.g. ''1033'' for English (United States) | | + | | ''Interface\==LocalIconsByExt=='' | Turn off loading icons from local files | ''off'' = Load icons from local files, ''on'' = Resolve icons for local files by file extension only | |
- | | ''Interface\BeepSound'' | A path to a sound file or system sound alias for the //[[ui_pref_environment#notifications|Beep when work finishes]]// function. | Defaults to system sound alias ''SystemDefault''. | | + | | ''Interface\==HonorDrivePolicy=='' | Follow Windows File Explorer configuration for hiding drives | ''off'' = Show all drives, ''on'' = Hide hidden drives | |
- | | ''Interface\MinimizeToTray'' | [[ui_pref_window|Minimize main window to taskbar status area]]. | ''0'' = Off, ''1'' = On | | + | | ''Interface\==TimeoutShellOperations=='' | Run potentially lengthy shell operations on background thread (can cause instability) | ''off'', ''on'' | |
- | | ''Interface\TryFtpWhenSshFails'' | [[ui_pref_network|When SFTP connection is rejected, knock FTP port]] | ''0'' = Off, ''1'' = On | | + | | ''Interface\==LocaleSafe=='' | [[ui_pref_languages|Language]] | [[https://learn.microsoft.com/en-us/windows/win32/intl/language-identifier-constants-and-strings|Decimal LCID]] of the language/locale. E.g. ''1033'' for English (United States) | |
+ | | ''==Interface\BeepSound=='' | A path to a sound file or system sound alias for the //[[ui_pref_environment#notifications|Beep when work finishes]]// function. | Defaults to system sound alias ''SystemDefault''. | | ||
+ | | ''Interface\==FlashTaskbar=='' | Flash taskbar button when user interaction is needed | ''off'', ''on'' | | ||
+ | | ''Interface\MinimizeToTray'' | [[ui_pref_window|Minimize main window to taskbar status area]]. | ''off'', ''on'' | | ||
+ | | ''Interface\==DDDisableMove=='' | Disable moving remote files when dropping them to another application | ''off'', ''on'' | | ||
+ | | ''==Interface\SessionTabNameFormat=='' | Format of session tab title | ''0'' = Only session name, ''1'' = Distinguish multiple sessions opened to the same site by the name of the current folder, ''2'' = As ''1'', but truncate long paths | | ||
+ | | ''Interface\TryFtpWhenSshFails'' | [[ui_pref_network|When SFTP connection is rejected, knock FTP port]] | ''off'', ''on'' | | ||
| ''Interface\SynchronizeOptions'' | Options for [[ui_keepuptodate|Keep Remote Directory up to Date]] | Bitmask. ''1'' = //Update subdirectories//, ''2'' = //Synchronize on start//, ''4'' = Ask user whether to //Synchronize on start//, ''8'' = //Continue on error// \\ The ''4'' and ''8'' has an effect with ''[[commandline#operations|/keepuptodate]]'' command-line operation only. | | | ''Interface\SynchronizeOptions'' | Options for [[ui_keepuptodate|Keep Remote Directory up to Date]] | Bitmask. ''1'' = //Update subdirectories//, ''2'' = //Synchronize on start//, ''4'' = Ask user whether to //Synchronize on start//, ''8'' = //Continue on error// \\ The ''4'' and ''8'' has an effect with ''[[commandline#operations|/keepuptodate]]'' command-line operation only. | | ||
- | | ''Logging\LogSensitive'' | [[ui_pref_logging|Log passwords and other sensitive information]] | ''0'' = Off, ''1'' = On \\ In the scripting, use a command-line switch ''[[commandline#logging|/loglevel=*]]''.| | + | | ''==Interface\SynchronizeParams=='' | Options for [[ui_synchronize|Synchronization]] and [[ui_keepuptodate|Keep Remote Directory up to Date]] | Bitmask. ''1'' = //Delete files// (with ''/keepuptodate'' and ''/synchronize'' [[commandline#operations|command-line operations only]], in scripting use the ''-delete'' switch, in .NET assembly use the ''removeFiles'' argument of the ''[[library_session_synchronizedirectories|Session.SynchronizeDirectories]]''), ''4'' = //Existing files only//, ''64'' = //Preview changes// (with ''/synchronize'' command-line operation only, in scripting use the [[scriptcommand_synchronize#preview|''-preview'' switch]], in .NET assembly use [[library_session_comparedirectories|''Session.CompareDirectories'' method]]), ''256'' = //Synchronize timestamps// mode, ''512'' = Turn off //Modification time comparison criteria// (with ''/synchronize'' command-line operation only, in scripting use the [[scriptcommand_synchronize#criteria|''-criteria'' switch]], in .NET assembly use the ''criteria'' argument of the ''Session.SynchronizeDirectories''), ''1024'' = //File size comparison criteria// (with ''/synchronize'' command-line operation only, see ''512''), ''4096'' = //Mirror// mode (with ''/synchronize'' command-line operations only, in scripting use the [[scriptcommand_synchronize#mirror|''-mirror'' switch]], in .NET assembly use the ''mirror'' argument of the ''Session.SynchronizeDirectories''), ''8192'' = //Case sensitive comparison criteria//, ''16384'' = //Checksum comparison criteria// (with ''/synchronize'' command-line operation only, see ''512'') | |
+ | | ''Interface\MaxWatchDirectories'' | [[ui_keepuptodate|Keep Remote Directory up to Date]] directory count warning limit | | | ||
+ | | ''Interface\==ScriptProgressFileNameLimit=='' | Maximal length of a filename in scripting progress output | Defaults to ''25''. | | ||
+ | | ''==Logging\LogFileAppend=='' | [[ui_pref_logging|Append session log file]] | ''off'', ''on'' | | ||
+ | | ''==Logging\LogProtocol=='' | [[ui_pref_logging|Log level]] | ''-1''...''2'' (//Reduced//, //Normal//, //Debug 1// and //Debug 2// logging levels respectively) \\ In the scripting, use a command-line switch ''[[commandline#logging|/loglevel]]''. | | ||
+ | | ''==Logging\LogSensitive=='' | [[ui_pref_logging|Log passwords and other sensitive information]] | ''off'', ''on'' \\ In the scripting, use a command-line switch ''[[commandline#logging|/loglevel=*]]''.| | ||
+ | | ''Logging\==LogMaxSize=='' | [[ui_pref_logging|Rotate log files after reaching]] | In bytes. \\ In the scripting, use a command-line switch ''[[commandline#logsize|/logsize]]''. | | ||
+ | | ''Logging\LogMaxCount'' | [[ui_pref_logging|Delete old logs files, keep … files]] | In the scripting, use a command-line switch ''[[commandline#logsize|/logsize]]''. | | ||
===== Other Settings ===== | ===== Other Settings ===== | ||
Line 27: | Line 44: | ||
To find correct syntax for settings not listed above, configure the setting in the GUI, [[config|save configuration to an INI file]] and use the same syntax as you find an INI file. | To find correct syntax for settings not listed above, configure the setting in the GUI, [[config|save configuration to an INI file]] and use the same syntax as you find an INI file. | ||
- | The settings is identified using syntax ''section\name'', where the ''section'' is a path to configuration section from ''[Configuration]'' section in an INI file.((Or ''HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Configuration'' key in a registry)) E.g. to configure a setting ''ExternalIpAddress'' in section ''[Configuration\Interface]'', use ''Interface\ExternalIpAddress''. | + | The settings is identified using syntax ''section\name'', where the ''section'' is a path to configuration section from ''[Configuration]'' section in an INI file.((Or ''HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Configuration'' key in a registry.)) E.g. to configure a setting ''ExternalIpAddress'' in section ''[Configuration\Interface]'', use ''Interface\ExternalIpAddress''. |
- | ===== Example ===== | + | ===== [[example]] Example ===== |
For example to configure an External IP address, in [[scripting]]: | For example to configure an External IP address, in [[scripting]]: | ||
Line 40: | Line 57: | ||
<code powershell> | <code powershell> | ||
$session.AddRawConfiguration("Interface\ExternalIpAddress", "198.51.100.10") | $session.AddRawConfiguration("Interface\ExternalIpAddress", "198.51.100.10") | ||
+ | </code> | ||
+ | |||
+ | In WinSCP GUI, to enable an option (which is not configurable directly in the GUI), it's usually enough to run WinSCP GUI once like this: | ||
+ | <code batch> | ||
+ | winscp.exe /rawconfig Interface\HonorDrivePolicy=off | ||
</code> | </code> | ||