| sftp_upload | R Documentation |
This function is used for uploading files to an SFTP account. The function uses connection credentials from a list object created by calling sftp_connect. The files will be uploaded to the SFTP account folder where you are currently "standing" as specified in the connection list object.
sftp_upload(
file,
fromfolder = getwd(),
sftp_connection = get("sftp_con"),
log_file = NA,
verbose = TRUE
)
file |
A character vector of file names. If the wildcard "*" is used,
then all files in |
fromfolder |
A string containing a valid path - relative or absolute -
to the folder where the files in |
sftp_connection |
A list object created with |
log_file |
Valid path to a text file (.txt, .csv, .log etc) including filename and file extension. |
verbose |
Logical. Turn on messages to console. Default is TRUE. |
The function returns the number of files uploaded, following successful upload.
sftp_download, sftp_delete, sftp_rename
Other sftp:
sftp_changedir(),
sftp_connect(),
sftp_delete(),
sftp_download(),
sftp_listdirs(),
sftp_listfiles(),
sftp_list(),
sftp_makedir(),
sftp_removedir(),
sftp_rename()
## Not run:
# minimal - upload all files in the current working directory
sftp_upload("*")
# take a vector of file names from a dataframe
sftp_upload(file = files$name, fromfolder = "my/relative/path/")
# take one specific file name from a vector from a dataframe
sftp_upload(file = files$name[1], fromfolder = getwd())
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.