module cli.ftp_cli
¶
Short summary¶
module pyquickhelper.cli.ftp_cli
Command line about transfering files.
Functions¶
function |
truncated documentation |
---|---|
Documentation¶
Command line about transfering files.
- pyquickhelper.cli.ftp_cli.ftp_upload(files, dest, host, user, pwd, ftps=False, fLOG=<built-in function print>)[source]¶
Pushes a file to a server using FTP or SFTP.
- Parameters:
- Returns:
status
Upload one or several files to a FTP server
Uploads a file, a list of files, files defined by a pattern to a FTP server using FTP or SFTP protocol.
<<<
python -m pyquickhelper ftp_upload --help
>>>
usage: ftp_upload [-h] [-f FILES] [-d DEST] [-ho HOST] [-u USER] [--pwd PWD] [-ft FTPS] Pushes a file to a server using `FTP` or `SFTP`. optional arguments: -h, --help show this help message and exit -f FILES, --files FILES local files to move, comma separated or defined with a pattern if character ``*`` is used (default: None) -d DEST, --dest DEST destination folder (default: None) -ho HOST, --host HOST server name or ip address (default: None) -u USER, --user USER user to log in (default: None) --pwd PWD password for the user (default: None) -ft FTPS, --ftps FTPS use `SFTP` or `FTP` (default: False)
The user and the password can be prefix by keyring,. The module keyring is then used to retrieve the values. Example:
--user=keyring,user,site
.