Sftp.PutFile method overrides the remote file if it already exists at the server and there is currently no option to change this behaviour in Rebex SFTP. With the advanced
Sftp.Upload method you can specify what action will take place in case the file already exists so this is the way to go even for a single file upload.
Sftp.Upload method can also be instructed to specify a list of file names via the
FileSet class. Please try the code below to specify the files one by one and upload them to the server with just one method call:
// specify a list of files to upload from the "C:\temp" directory
FileSet localFiles = new FileSet(@"C:\temp");
Sftp sftp = new Sftp();
// upload the local files specified by the FileSet instance