How to reach the home directory of user? - WeOnlyDo Discussion board

How to reach the home directory of user? (General questions)

by Sumit, Tuesday, February 08, 2005, 11:36 (7227 days ago)

Hi,
Can anybody tell me how can I automatically be taken to user's home folder once I log in? this is what happens in most of the client components, that once you log in, you are directed to the home folder of the user. But in SFTPexplorer, we need to explicitly set the RemotePath which becomes our initial server side view.
I cannot hardcode the RemotePath in my application nor can I keep it in configuration, due to the nature of my application.
All I need to do is upload files straight to user's home folder once he is logged in. What should I set the RemotePath as, or otherwise, How can I do this?
Thanks in advance.
Sumit.

Re: How to reach the home directory of user?

by wodSupport, Tuesday, February 08, 2005, 11:40 (7227 days ago) @ Sumit

Sumit,

I suggest you call RealPath method with . or ~ arguments once you login. Usually (on most UNIX systems) this will give you home dir.