[SFTPdll] how to get current remote directory (General questions)

by Binh NGUYEN @, (5183 days ago)

Hi all,

Can anyone tell me how to get the current remote working directory as the command pwd does?
We find RemotePath property but it's just applied to file transfer (get,put).
Is there any method to work around?

Thanks,

Binh

locked

Re: [SFTPdll] how to get current remote directory

by wodDamir @, (5183 days ago) @ Binh NGUYEN

Hi Binh,

You can send PWD command manually using RawSend method. However, there's basically no need, since the component *ALWAYS* uses absolute paths for methods.

I.e.:

wodSFTP1.ListDir /home/userDir/

Regards,
Damba

locked

Re: [SFTPdll] how to get current remote directory

by Binh NGUYEN @, (5183 days ago) @ wodDamir

Thanks Damir,

I'm sorry but we're using SFtpDLL API for Visual C++.

All methods begin with Sftp_ , for example Sftp_Connect. We cannot any method which contains RawSend. Is there something wrong?

Regards,

Binh

locked

Re: [SFTPdll] how to get current remote directory

by wodDamir @, (5183 days ago) @ Binh NGUYEN

Binh,

Sorry, I made a mistake in my previous reply. The RawSend is in our FTP component.

However, you can try using RealPath method, and supply it . as an argument. This should return your current path.

Regards,
Damba

locked