Differences
This shows you the differences between the selected revisions of the page.
faq_script_ini 2014-11-13 | faq_script_ini 2023-05-19 (current) | ||
Line 1: | Line 1: | ||
====== How do I configure site, transfer and/or any other settings for which there are no script commands? ====== | ====== How do I configure site, transfer and/or any other settings for which there are no script commands? ====== | ||
+ | |||
===== Site Settings ===== | ===== Site Settings ===== | ||
- | For site settings, you can use ''-rawsettings'' switch of ''[[scriptcommand_open|open]]'' command. | + | For site settings, you can use ''[[scriptcommand_open#rawsettings|-rawsettings]]'' switch of ''[[scriptcommand_open|open]]'' command. |
- | + | ||
- | See [[rawsettings|raw site settings]] syntax. | + | |
- | + | ||
- | ===== Global Settings ===== | + | |
- | + | ||
- | ==== Transfer Settings ==== | + | |
- | For [[transfer_settings|transfer setting]], you can pre-configure your preferred settings as [[ui_pref_transfer|default transfer settings]]. The script uses the default transfer settings as initial. | + | |
- | + | ||
- | You should then [[scripting#configuration|isolate configuration]] prepared for the script. | + | |
- | + | ||
- | If the value of the option is not static you can generate the INI file before running the script. | + | |
- | + | ||
- | For example, to configure changing case of filenames to lowercase during transfer, use following INI file: | + | |
- | + | ||
- | <code ini> | + | |
- | [Configuration\Interface\CopyParam] | + | |
- | ; File name case modification (1 = Upper case, 2 = Lower case, 4 = Lower case 8.3) | + | |
- | FileNameCase=2 | + | |
- | </code> | + | |
- | ==== Other Settings ==== | + | See [[rawsettings|raw site settings]] syntax. WinSCP can [[ui_generateurl|generate the code for you]]. |
- | The same applies to most other settings, such as configuring reconnect interval: | + | |
- | <code ini> | + | |
- | [Configuration\Interface] | + | |
- | SessionReopenAuto=10000 | + | |
- | </code> | + | |
- | ==== Using /rawconfig parameter ==== | + | ===== [[transfer]] Transfer Settings ===== |
+ | For transfer settings, use ''-rawtransfersettings'' switch of script commands that transfer files, like [[scriptcommand_put#rawtransfersettings|''put'']], [[scriptcommand_get#rawtransfersettings|''get'']], [[scriptcommand_synchronize#rawtransfersettings|''synchronize'']], etc. | ||
- | In the latest beta release, you can use ''[[commandline#configuration|/rawconfig]]'' parameter. &beta | + | See [[rawtransfersettings|raw transfer settings]] syntax. |
- | For example to configure the two settings shown above use: | + | ===== [[global]] Global Settings ===== |
- | <code batch> | + | For global settings, use ''[[commandline#rawconfig|/rawconfig]]'' command-line parameter. |
- | winscp.exe ... /rawconfig Interface\CopyParam\FileNameCase=2 Interface\SessionReopenAuto=10000 | + | |
- | </code> | + | |
- | In [[library|.NET assembly]], use ''[[library_session_addrawconfiguration|Session.AddRawConfiguration]]'': | + | See [[rawconfig|raw configuration]] syntax. |
- | <code csharp> | ||
- | session.AddRawConfiguration("Interface\\CopyParam\\FileNameCase", "2"); | ||
- | session.AddRawConfiguration("Interface\\SessionReopenAuto", "10000"); | ||
- | </code> |