Topic "How do I specify the current directory on the Session.PutFiles ?"

Author Message


I could be able to transfer files to the remote path sub directories by specifying in the remotePath in the Session PutFiles method but one of my requirement i would like to simply transfer to the current logged in Directory. How do i specify current logged in directory in remotePath ?

public TransferOperationResult PutFiles(
string localPath,
string remotePath,
bool remove = false,
TransferOptions options = null

session.PutFiles("c:\working\test.txt", "", true).Check(); //would like to know how do specify current logged in directory.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
You can use ./ or Session.HomePath + "/".

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License