[SFTPdll] how to get current remote directory (General questions)
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
Re: [SFTPdll] how to get current remote directory
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
Re: [SFTPdll] how to get current remote directory
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
Re: [SFTPdll] how to get current remote directory
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