Differences

This shows you the differences between the selected revisions of the page.

2015-04-26 2015-04-26
no summary (180.191.108.2) (hidden) Restored revision 1424335706. Undoing revisions 1430049990, 1430053279, 1430053496, 1430055284, 1430055397, 1430055712. (martin) (hidden)
Line 10: Line 10:
&screenshotpict(scripting) &screenshotpict(scripting)
-0��0�+ +===== Using Scripting ===== 
-33������ 0 +Enter the console/scripting mode by using ''[[executables|winscp.com]]''; or ''/console'' command-line parameter with ''[[executables|winscp.exe]]''. For details see [[commandline#scripting|console/scripting command-line parameters]]. 
- *�H�� + 
-�0{1 0 UUS10U +For automation, commands can be read from a script file specified by ''/script'' switch, passed from the command-line using the ''/command'' switch, or read from standard input of ''winscp.com''
-+ 
-Apple Inc.1&0$U Apple Certification Authority1/0-U&Apple FairPlay Certification Authority0 +//Since WinSCP 5.7,// when running commands specified using ''/script'' or ''/command'', batch mode is used implicitly and overwrite confirmations are turned off. &recent (* Other articles referring to "option batch abort" are left intact until 5.7 is widespread *) In older releases and in an interactive scripting mode, the user is prompted in the same way as in GUI mode. To force batch mode (all prompts are automatically answered negatively) use the command ''[[scriptcommand_option|option batch abort]]''. For batch mode it is recommended to turn off confirmations using ''[[scriptcommand_option|option confirm off]]'' to allow overwrites (otherwise the [[ui_overwrite|overwrite confirmation prompt]] would be answered negatively, making overwrites impossible). 
-100210173634Z + 
-150209173634Z0e1 0 UUS10U +Multiple sessions can be opened simultaneously. Use the ''[[scriptcommand_session|session]]'' command to switch between them
- + 
-Apple Inc.10U Apple FairPlay1(0&UiPad.3333AF100210AF0001AF0000090��0 +Note that the first connection to an SSH server requires [[#hostkey|verification of the host key]]
- *�H�� +Also the first connection to FTPS or WebDAVS host with [[tls#certificate|certificate]] signed by untrusted authority requires verification of the certificate. 
-���0�������$��� + 
-��( �X���u����3Bd=�+�RlLHDq�h��TT'��r����R鎫վ��x��d �5�sW�?Oצ�i�cƁ���ں��@42�������(/Iìm��貖�uϵ(�K��`0^0U��0 U�0�0U�2X���B� ���&�zZhr0U#0�� +~~AD~~ 
-���NI��cbYd0 +
- *�H�� +
-����k�E��l�g�%<�������L�^ILS�k�o.�y`(�gu#7��a�쑊�� +
-!���"#l��e�P��Z���H������ �&�E �jF�yB_ڴ��<�(Q�@����#�C��[�-����0�q0�Y�0 +
- *�H�� +
-�0b1 0 UUS10U +
-+
-Apple Inc.1&0$U Apple Certification Authority10U +
-Apple Root CA0 +
-070214192041Z+
-120214192041Z0{1 0 UUS10U +
-+
-Apple Inc.1&amp;0$U Apple Certification Authority1/0-U&Apple FairPlay Certification Authority0��0 +
- *�H�� +
-����0������g<]*��w��1����І) +
-��dJ�i� +
-����c�:-!=R�#�)����(�i�r$���x1���*3����H*a��y�]��|�x�R���nr�]ˈ�U��M �O'g�����ڭ����0��0U��0U�0�0U� +
-���NI��cbYd0U#0�+�iG�v ��k�.@��GM^06U/0-0+�)�'�%http://www.apple.com/appleca/root.crl0 +
- *�H�� +
-�����s����ņu���@�j- �[�n�[�H}@�a-K7p8��K����3o_r���v�WXq�>��.�/�:s�2e +
-V�M xmУtd�T����*�y��������I3igA��h��z���$�*�h��{�ٺ�ʓ��7f��1�u��/���97=_��͚p��"��n$i;R�����Cp��!�C˻��[���w��MV3]�\Y1��;EVͮ˛��ܓ���Xx�ٙ��^��s4T����0��0���0 +
- *�H�� +
-�0b1 0 UUS10U +
-+
-Apple Inc.1&0$U Apple Certification Authority10U +
-Apple Root CA0 +
-060425214036Z +
-350209214036Z0b1 0 UUS10U+
===== Checking Results ===== ===== Checking Results =====
WinSCP [[executables]] return exit code 1 when any command is interrupted due to an error or any prompt is answered //Abort// (even automatically in batch mode). Otherwise it returns the exit code 0. WinSCP [[executables]] return exit code 1 when any command is interrupted due to an error or any prompt is answered //Abort// (even automatically in batch mode). Otherwise it returns the exit code 0.
Line 57: Line 30:
-&lt;?xml version=&quot;1.0" encoding=&quot;UTF-8"?> +===== [[syntax]] Commands Syntax ===== 
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +All WinSCP commands have syntax
-<plist version="1.0"+<code
-&lt;dict> +command -switch -switch2 parameter1 parameter2 ... parametern 
- <key>DeviceClass</key> +</code
- <string>iPad</string> + 
- <key>DeviceMap</key> +==== [[quotes]] Command Parameters with Spaces ==== 
- <array> + 
- <dict> +Command parameters that include space(s) have to be surrounded by double-quotes. To use double-quote literally, double it: 
- <key>BDID</key> +<code winscp
- <integer>4</integer> +put &quot;file with spaces and &quot;&quot;quotes&quot;&quot;.html&quot
- <key>BoardConfig</key> +</code
- <string>k93ap</string> + 
- <key>CPID</key> +Note that when you are specifying commands on [[commandline|command-line]] using ''/command'', you need to surround each command by double-quote and [[commandline#syntax|escape the in-command double-quotes by doubling them]]
- <integer>35136</integer> + 
- <key>Platform</key> +To debug the quoting, enable session logging on level //Debug 1// (''/loglevel=1''). The log will show how WinSCP understands both your command-line and individual scripting commands.·&amp;recent_feature(5.7)
- <string>s5l8940x</string> +
- <key>SCEP</key> +
- <integer>17</integer> +
- </dict> +
- </array> +
- <key>FirmwareDirectory</key> +
- <string>Firmware</string> +
- <key>KernelCachesByPlatform</key> +
- <dict/> +
- <key>KernelCachesByTarget</key> +
- <dict> +
- <key>k93</key> +
- <dict> +
- <key>Release</key> +
- <string>kernelcache.release.k93</string> +
-··</dict+
- </dict> +
- &lt;key&gt;MinimumSystemPartition&lt;/key> +
- <dict> +
-··&lt;key>058-00314-002.dmg&lt;/key> +
-··<integer>1419</integer+
- </dict&gt; +
-·&lt;key&gt;ProductBuildVersion&lt;/key&gt; +
- <string>11D201</string> +
- <key>ProductType</key> +
- <string>iPad2,1</string> +
- <key>ProductVersion</key> +
- <string>7.1.1&lt;/string>+
- <key>RamDisksByPlatform</key+
- <dict> +
-··&lt;key>s5l8940x</key> +
- <dict> +
- <key>Update</key> +
- <string>058-00363-002.dmg</string&gt+
- <key>User</key> +
- <string>058-00183-002.dmg&lt;/string> +
- </dict> +
- </dict> +
- <key>RestoreRamDisks</key> +
- <dict> +
- <key>Update</key> +
- <string>058-00363-002.dmg</string> +
- <key>User</key> +
- <string>058-00183-002.dmg</string> +
- </dict> +
- &lt;key>SupportedProductTypeIDs</key> +
- <dict> +
- <key>DFU</key> +
- <array> +
- <integer>67144000</integer> +
- </array+
- <key>Recovery</key+
- <array> +
- <integer>67144000</integer> +
- </array> +
- </dict> +
- <key>SupportedProductTypes</key> +
- <array> +
- <string>iPad2,1&lt;/string> +
- </array> +
- <key>SystemPartitionPadding</key> +
- <dict> +
- <key>k93</key> +
- <dict> +
- <key>128</key> +
- <integer>1280</integer> +
- <key>16</key> +
- <integer>160</integer> +
- <key>32</key> +
- <integer>320</integer> +
- <key>64</key> +
- <integer>640</integer> +
- <key>8</key> +
- <integer>80</integer> +
- </dict> +
- </dict> +
- <key>SystemRestoreImages</key> +
- <dict> +
- <key>User</key> +
- <string>058-00314-002.dmg&lt;/string&gt; +
- </dict> +
-</dict> +
-</plist>+
-0��0�+� 
-33������ 0 
- *�H�� 
-�0{1 0 UUS10U 
- 
-Apple Inc.1&0$U Apple Certification Authority1/0-U&Apple FairPlay Certification Authority0 
-100210173634Z 
-150209173634Z0e1 0 UUS10U 
- 
-Apple Inc.10U Apple FairPlay1(0&UiPad.3333AF100210AF0001AF0000090��0 
- *�H�� 
-����0�������$��� 
-��( �X���u����3Bd=�+�RlLHDq�h��TT'��r����R鎫վ��x��d �5�sW�?Oצ�i�cƁ���ں��@42�������(/Iìm��貖�uϵ(�K��`0^0U��0 U�0�0U�2X���B� ���&�zZhr0U#0�� 
-���NI��cbYd0 
- *�H�� 
-����k�E��l�g�%<�������L�^ILS�k�o.�y`(�gu#7��a�쑊�� 
-!���"�#l��e�P��Z���H������ �&�E �jF�yB_ڴ��<�(Q�@����#�C��[�-����0�q0�Y�0 
- *�H�� 
-�0b1 0 UUS10U 
- 
-Apple Inc.1&0$U Apple Certification Authority10U 
-Apple Root CA0 
-070214192041Z 
-120214192041Z0{1 0 UUS10U 
- 
-Apple Inc.1&0$U Apple Certification Authority1/0-U&Apple FairPlay Certification Authority0��0 
- *�H�� 
-����0������g<]*��w��1����І)� 
-��dJ�i� 
-����c�:-!=R�#�)����(�i�r$���x1���*3����H*a��y�]��|�x�R���nr�]ˈ�U��M �O'g�����ڭ����0��0U��0U�0�0U� 
-���NI��cbYd0U#0�+�iG�v ��k�.@��GM^06U/0-0+�)�'�%http://www.apple.com/appleca/root.crl0 
- *�H�� 
-�����s����ņu���@�j- �[�n�[�H}@�a-K7p8��K����3o_r���v�WXq�>��.�/�:s�2e 
-V�M xmУtd�T����*�y��������I3igA��h��z���$�*�h��{�ٺ�ʓ��7f��1�u��/���97=_��͚p��"��n$i;R�����Cp��!�C˻��[���w��MV3]�\Y1��;EVͮ˛��ܓ���Xx�ٙ��^��s4T����0��0���0 
- *�H�� 
-�0b1 0 UUS10U 
- 
-Apple Inc.1&0$U Apple Certification Authority10U 
-Apple Root CA0 
-060425214036Z 
-350209214036Z0b1 0 UUS10U 
==== [[variables]] Environment Variables ==== ==== [[variables]] Environment Variables ====
Line 230: Line 79:
</code> </code>
-&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?>\r +==== Case Sensitivity of File Names ==== 
-<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\r + 
-<plist version=\"1.0\">\r +Note that WinSCP treats filenames in case sensitive manner. So even if your server treats filenames in case insensitive manner, make sure you specify case properly((This is important particularly for FTP sessions.)).
-<dict>\r +
- <key>ActivationRandomness</key>\r +
- <string>84AE7F6C-6183-47AE-9E81-AB177E6D1BB2</string>\r +
- <key>ActivationState</key>\r +
- <string>Activated</string>\r +
- <key>BuildVersion</key>\r +
- <string>12D508</string>\r +
- <key>DeviceCertRequest</key>\r +
- <data>\r +
- LS0tLS1CRUdJTiBDRVJUSUZJQ0FURSBSRVFVRVNULS0tLS0KTUlJQnhEQ0NBUzBDQVFB\r +
- d2dZTXhMVEFyQmdOVkJBTVRKRUpETlRoRE0wRTFMVEUzUlRBdE5EWkVNeTA0TTBZMwpM\r +
- VE00TVRoRk5VUXlOMEkwTkRFTE1Ba0dBMVVFQmhNQ1ZWTXhDekFKQmdOVkJBZ1RBa05C\r +
- TVJJd0VBWURWUVFICkV3bERkWEJsY25ScGJtOHhFekFSQmdOVkJBb1RDa0Z3Y0d4bElF\r +
- bHVZeTR4RHpBTkJnTlZCQXNUQm1sUWFHOXUKWlRDQm56QU5CZ2txaGtpRzl3MEJBUUVG\r +
- QUFPQmpRQXdnWWtDZ1lFQTJUWHRibUw0NXVJWWJiU1ZPV1kxT2VaKwpZU1BhQ2NjRzM1\r +
- ZTBMNVpNb29LVnhOakxIREpxMnAzbERiTnN5YzZkT0pqZGtZZnNTYTVVYWF6TVQzQXB1\r +
- ZFpOCjdaOERXM0F1QXE5b3h3bi9FOUlNOTdKcmVtekJiYng5cVU3aUpjOURlZXdyblN4\r +
- U0QyVFhZMnp6TjZwT0poVXAKSWM5MDNuQUwzTVM1MjFXVml0MENBd0VBQWFBQU1BMEdD\r +
- U3FHU0liM0RRRUJCUVVBQTRHQkFLdDJQZnBEekFsTwphQVFFWWtFU3FlTDRrNDBiVUla\r +
- UWRxK1pGbnk4RitHRC9ZR3FtUFg0K1lySWErVkExdlFBWk9XSFd5RkdPekZLCnM5MXJM\r +
- cUNWVkEvK3NxVGZMdlY4VGNoaE1yUGhBSFlHL1pmUGdYQXduY2gvUG5XTnNYWmZsOEpU\r +
- aGhWdkFQKzMKbnRYN3dvSXZvN1FHUklSdVRYOENhVzdza2dCeXorU0sKLS0tLS1FTkQg\r +
- Q0VSVElGSUNBVEUgUkVRVUVTVC0tLS0tCg==\r +
- </data>\r +
- &lt;key>DeviceClass</key>\r +
- <string>iPad</string>\r +
- <key>DeviceVariant</key>\r +
- <string>A</string>\r +
- <key>FMiPAccountExists</key>\r +
- <false/>\r +
- <key>ModelNumber</key>\r +
- <string>MC769</string>\r +
- <key>ProductType</key>\r +
- <string>iPad2,1&lt;/string>\r +
- <key>ProductVersion</key>\r +
- <string>8.2</string>\r +
- <key>RegionCode</key>\r +
- <string>ZP</string>\r +
- <key>RegionInfo</key>\r +
- <string>ZP/A</string>\r +
- <key>SerialNumber</key>\r +
- <string>DLXGQS0QDFHW</string>\r +
- <key>UniqueChipID</key>\r +
- <integer>2688114539789</integer>\r +
- <key>UniqueDeviceID</key>\r +
- <string>5aab68580e5535640935f7f7800fc7134ef49b8d</string>\r +
-</dict>\r +
-</plist>\r+
==== Comments ==== ==== Comments ====
Line 326: Line 127:
Learn about ''[[executables|winscp.com]]'', the console interface tool. Learn about ''[[executables|winscp.com]]'', the console interface tool.
-0��0�+� +===== [[hostkey]] Verifying the Host Key or Certificate in Script ====
-33������ 0 +The first connection to an SSH server requires [[ssh_verifying_the_host_key|verification of the host key]]. To automate the verification in script, use ''-hostkey'' switch of ''[[scriptcommand_open|open]]'' command to accept the expected host key automatically. 
- *�H�� + 
-�0{1 0 UUS10U +You can find the key fingerprint on [[ui_fsinfo|Server and Protocol Information Dialog]]. You can also copy the key fingerprint to clipboard from the confirmation prompt on the first (interactive) connection using //Copy Key// button.·//Learn more about [[faq_hostkey|obtaining host key fingerprint]]//. 
-+ 
-Apple Inc.1&amp;0$U Apple Certification Authority1/0-U&Apple FairPlay Certification Authority0 +FTPS/WebDAVS [[tls#certificate|TLS/SSL certificate]] signed by untrusted authority may also need to be verified. To automate the verification in script, use ''-certificate'' switch of ''[[scriptcommand_open|open]]'' command to accept the expected certificate automatically.
-100210173634Z +
-150209173634Z0e1 0 UUS10U +
-+
-Apple Inc.10U Apple FairPlay1(0&UiPad.3333AF100210AF0001AF0000090��0 +
- *�H�� +
-����0�������$��� +
-��( �X���u����3Bd=�+�RlLHDq�h��TT'��r����R鎫վ��x��d �5�sW�?Oצ�i�cƁ���ں��@42�������(/Iìm��貖�uϵ(�K��`0^0U��0 U�0�0U�2X���B� ���&�zZhr0U#0�� +
-���NI��cbYd0 +
- *�H�� +
-����k�E��l�g�%<�������L�^ILS�k�o.�y`(�gu#7��a�쑊�� +
-!���"�#l��e�P��Z���H������ �&�E �jF�yB_ڴ��<�(Q�@����#�C��[-����0�q0�Y�0 +
- *�H�� +
-�0b1 0 UUS10U +
-+
-Apple Inc.1&0$U Apple Certification Authority10U +
-Apple Root CA0 +
-070214192041Z +
-120214192041Z0{1 0 UUS10U +
-+
-Apple Inc.1&0$U Apple Certification Authority1/0-U&Apple FairPlay Certification Authority0��0 +
- *�H�� +
-����0������g<]*��w��1����І)� +
-��dJ�i� +
-����c�:-!=R�#�)����(�i�r$���x1���*3����H*a��y�]��|�x�R���nr�]ˈ�U��M �O'g�����ڭ����0��0U��0U�0�0U� +
-���NI��cbYd0U#0�+�iG�v ��k�.@��GM^06U/0-0+�)�'�%http://www.apple.com/appleca/root.crl0 +
- *�H�� +
-�����s����ņu���@�j- �[�n�[�H}@�a-K7p8��K����3o_r���v�WXq�>��.�/�:s�2e +
-V�M xmУtd�T����*�y��������I3igA��h��z���$�*�h��{�ٺ�ʓ��7f��1�u��/���97=_��͚p��"��n$i;R�����Cp��!�C˻��[���w��MV3]�\Y1��;EVͮ˛��ܓ���Xx�ٙ��^��s4T����0��0���0 +
- *�H�� +
-�0b1 0 UUS10U +
-+
-Apple Inc.1&amp;0$U Apple Certification Authority10U +
-Apple Root CA0 +
-060425214036Z +
-350209214036Z0b1 0 UUS10U+

Last modified: by martin