Remote Directory Listing failed due to prepand slash before Directory.

Advertisement

nishit.2571988@gmail.com
Joined:
Posts:
10
Location:
Ahmedabad

Remote Directory Listing failed due to prepand slash before Directory.

> 2022-01-06 23:29:15.380 CWD /'TestDir'
Please be noted that while listing remote directory I am facing problem, my code is as below
RemoteDirectoryInfo remoteDirInfo= session.ListDirectory("/'TestDir'")
Bowever by using this code log looks like CWD /'TestDir' so directory listing was failed.
So to complete directory listing I want to remove / from CWD /'TestDir' so my question is that how to remove / from CWD /'TestDir', so log will be as CWD 'TestDir' then it is working fine.

I have tried with below code but it's not working
RemoteDirectoryInfo remoteDirInfo= session.ListDirectory("'TestDir'")
However by using this code log will appear as CWD /'Home'/'TestDir'. I want to remove /'Home'/ from CWD /'Home'/'TestDir'. So my question is that how to remove /'Home'/ from CWD /'Home'/'TestDir'. So log will be as CWD 'TestDir' then it is working fine.[/b]

This is perfectly working fine with command line as below code, but not working with .NET assembly
cd 'TestDir'
log will appear using command line
2022-01-06 23:29:15.380 CWD /'TestDir'
When I'm using command line there no / prepend with dir but when use .NET assembly / prepends automatically with dir so remote directory not listing with .NET assembly.

Please kindly suggest me.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
37,180
Location:
Prague, Czechia

Re: Remote Directory Listing failed due to prepand slash before Directory.

Please post .NET assembly log for session.ListDirectory("'TestDir'") and scripting log for cd 'TestDir'.

Reply with quote

Advertisement

You can post new topics in this forum