remote_file Property
The name of the remote file for uploading, downloading, etc.
Syntax
def get_remote_file() -> str: ... def set_remote_file(value: str) -> None: ...
remote_file = property(get_remote_file, set_remote_file)
Default Value
""
Remarks
The remote_file is either an absolute file path, or a relative path based on the server current directory.
A number of methods use remote_file as an argument.
Example (Setting RemoteFile)
SCPControl.Localfile = "C:\localfile.txt" SCPControl.RemoteFile = "remotefile.txt" SCPControl.Download() SCPControl.Localfile = "C:\localfile2.txt" SCPControl.RemoteFile = "folder/remotefile2.txt" SCPControl.Upload()
The remote path may be specified as part of value supplied here, or separately in remote_path.
Multiple file uploads and downloads are supported through the use of filemasks.
To upload files matching a filemask set local_file to a local path including a filemask. Set remote_path to the directory on the server where the files will be uploaded. In this case remote_file is ignored. All matching files will be upload when upload is called. The on_start_transfer, on_transfer, and on_end_transfer events provide details about the individual file transfers.
To download files matching a filemask set remote_file to a filemask. The path may be specified as part of the value in remote_file or may be set separately in remote_path. local_file should be set to a local directory where files will be downloaded. When download is called all matching files are downloaded. The on_start_transfer, on_transfer, and on_end_transfer events provide details about the individual file transfers. In the event an individual file fails to transfer the on_error event will fire.