This function combines calls to the sftpConnect, sftpPutFile, and sftpDisconnect functions. A random string will be prefixed to the file name to prevent overwriting existing files on the server.

sftpUploadFile(privateKeyFileName, userName, remoteFolder = ".", fileName)

Arguments

privateKeyFileName

A character string denoting the path to an RSA private key.

userName

A character string containing the user name.

remoteFolder

The remote folder to upload the file to.

fileName

A character string denoting the path to file to upload.