I have an application that can perform FTP/SFTP connections but I'm having issues with something, all this time I've been tested it using a remote directory that I knew, but for now I want to get connected to a server to the root directory if I don't know the remote directory.
What it does is:
if (RemoteDirectoryPath != "Home")
RemoteDirectory = MySession.ListDirectory(RemoteDirectoryPath);
else
RemoteDirectory = MySession.ListDirectory("/");
As you can see in my code above, if the directory is different from Home it will list directory "/", today I was receiving an error that "/" does not exist, even when I did an ftp connection with cmd and then pwd, it was telling me that remote directory was "/"
How can I list directory without use RemoteDirectory = MySession.ListDirectory("/");
and have someting like RemoteDirectory = MySession.ListDirectory(Root.Directory);
Do you have any idea?