Differences

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

scriptcommand_get 2021-08-09 scriptcommand_get 2023-09-12 (current)
Line 14: Line 14:
The last parameter specifies target local directory and optionally [[operation_mask|operation mask]] to store file(s) under different name. Target directory must end with backslash. To download more files to current working directory use ''.\'' as the last parameter. The last parameter specifies target local directory and optionally [[operation_mask|operation mask]] to store file(s) under different name. Target directory must end with backslash. To download more files to current working directory use ''.\'' as the last parameter.
-With the [[commandline#stdout|''/stdout'' command-line switch]], ''-'' can be used as a target to stream the contents of downloaded file(s) to the [[executables#redirection|standard output of ''winscp.com'']]. Streaming is supported with the [[sftp|SFTP protocol]] only.+With the [[commandline#stdout|''/stdout'' command-line switch]], ''-'' can be used as a target to ==stream== the contents of downloaded file(s) to the [[executables#redirection|standard output of ''winscp.com'']]. Streaming is supported with the [[sftp|SFTP]] and [[ftp|FTP]].
When specific file name is used, command fails when the file does not exist. When wildcard is used, command succeeds, without doing anything, if the wildcard does not match any file, by default (you can change this using ''[[scriptcommand_option#failonnomatch|option failonnomatch on]]'' command). When specific file name is used, command fails when the file does not exist. When wildcard is used, command succeeds, without doing anything, if the wildcard does not match any file, by default (you can change this using ''[[scriptcommand_option#failonnomatch|option failonnomatch on]]'' command).
-You can have WinSCP [[ui_generateurl|generate a code template]] for ''get'' for you.+You can have WinSCP [[guide_automation#generating|generate a code template]] for ''get'' for you.
See also ''[[scriptcommand_synchronize|synchronize]]'', if you need to transfer modified or non-existing files only. See also ''[[scriptcommand_synchronize|synchronize]]'', if you need to transfer modified or non-existing files only.
Line 28: Line 28:
| ''-==delete==''              | Delete source remote file(s) after a successful transfer. | | ''-==delete==''              | Delete source remote file(s) after a successful transfer. |
| ''-==latest==''          | Download the latest file from the files selected by the ''file'', ''file2'' ... parameters (typically [[file_mask|file masks]]) only. | | ''-==latest==''          | Download the latest file from the files selected by the ''file'', ''file2'' ... parameters (typically [[file_mask|file masks]]) only. |
-| ''-==resume==''              | Automatically resume transfer if possible·((Applies for individual files transfers only. It does not skip transfer of fully transferred files. For that, combine the switch with ''-neweronly''.)) ([[SFTP]] and [[FTP]] protocols only). \\ Cannot be combined with ''-append''. Has no effect when streaming (''-'' target). | +| ''-==resume==''              | Automatically resume transfer if possible.((Applies for individual files transfers only. It does not skip transfer of fully transferred files. For that, combine the switch with ''-neweronly''.)) \\ [[SFTP]] and [[FTP]] protocols only. Cannot be combined with ''-append''. Has no effect when streaming (''-'' target). | 
-| ''-==append==''              | Append source file to the end of target file ([[sftp|SFTP protocol]] only). \\ Cannot be combined with ''-resume''. Has no effect when streaming (''-'' target). |+| ''-==append==''              | Append source file to the end of target file. \\ [[sftp|SFTP protocol]] only. Cannot be combined with ''-resume''. Has no effect when streaming (''-'' target). |
| ''-==preservetime==''        | Preserve timestamp. | | ''-==preservetime==''        | Preserve timestamp. |
| ''-==nopreservetime==''      | Do not preserve timestamp. | | ''-==nopreservetime==''      | Do not preserve timestamp. |

Last modified: by martin