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

Author Message
RameshMuthiah

Guest


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
)

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

You can post new topics in this forum

Search

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License