| sftp_rename | R Documentation |
Specify a current name and a new name, for a file or folder existing in an
SFTP account. While folders must be empty when using
sftp_removedir, that is not the case with sftp_rename -
non-empty folders can be renamed.
sftp_rename(
from,
to,
sftp_connection = get("sftp_con"),
verbose = TRUE,
curlPerformVerbose = FALSE
)
from |
A single name of an existing file or folder. If a vector of names is supplied, only the first value will be used, and there will be a warning. |
to |
A single name of an existing file or folder. If a vector of names is supplied, only the first value will be used, and there will be a warning. |
sftp_connection |
A list object created by calling sftp_connect.
Default is |
verbose |
Logical. Turn on messages to console. Default is TRUE |
curlPerformVerbose |
Logical. Turn on messages to console form curlPerform. Default is FALSE. |
The function returns TRUE if successful.
sftp_download, sftp_upload, sftp_delete
Other sftp:
sftp_changedir(),
sftp_connect(),
sftp_delete(),
sftp_download(),
sftp_listdirs(),
sftp_listfiles(),
sftp_list(),
sftp_makedir(),
sftp_removedir(),
sftp_upload()
## Not run:
# minimal - rely on defaults
sftp_rename("oldname.csv", "newname.csv")
# explicit - rename a folder
sftp_rename(from = "old_folder_name",
to = "new_folder_name",
sftp_connection = sftp_con,
verbose = TRUE,
curlPerformVerbose = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.