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

Advertisement

RameshMuthiah
Guest

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

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,658
Location:
Prague, Czechia

Re: How do I specify the current directory on the Session.PutFiles ?

You can use ./ or Session.HomePath + "/".

Reply with quote

Advertisement

You can post new topics in this forum