You are correct that the "transfer to temporary file name" function in WinSCP looks like a path.
It makes a WinSCP boot file with the name added to it .filepart, removing the extension as soon as it is done.
TransferOptions transferOptions = new TransferOptions();
transferOptions.ResumeSupport.State = TransferResumeSupportState.On;
session.PutFiles(@"d:\toupload\myfile.dat", "/home/user/", false, transferOptions).Check();
Although only supported by SFTP.
With FTP, you must do this manually.
session.PutFiles(@"d:\toupload\myfile.dat", "/home/user/myfile.dat.filepart").Check();
session.MoveFile("/home/user/myfile.dat.filepart", "/home/user/myfile.dat");
, , Session.PutFiles TransferOperationResult, Session.MoveFile .
TransferOperationResult transferResult;
transferResult = session.PutFiles(@"d:\toupload\*.dat", "/home/user/*.filepart")
transferResult.Check();
foreach (TransferEventArgs transfer in transferResult.Transfers)
{
string finalName = transfer.Destination.Replace(".filepart", ".dat");
session.MoveFile(transfer.Destination, finalName);
}
PowerShell / .
. SFTP ( FTP) .