Can't access the file or directory error. LIST -a command

Advertisement

Magda
Donor
Joined:
Posts:
4
Location:
Poland

Can't access the file or directory error. LIST -a command

Hello I am using WinSCP .NET assembly 6.3.7 in Visual Studio 2022 VB. I have issues with getting file from FTP server to local directory, foulting with errors:
Can’t get attribute of file, Could not retrieve directory listing, Can’t access the file or directory.
File is stored at A:/Listy/ directory on FTP server. File exist in the server – I am trying to get Lista9.csv.

I monitored the communication with Wireshark, please find loggs attached
-What exactly is LIST –a command, the response for this command is : Can’t access the file or directory. Than - even if the current directory is A:/Listy/ the program is trying to go to Listy again - with no success. Please check attachment. Is there a way to provoke some other listing command to the FTP server?
BR
Magda
  • Log.txt (39.45 KB, Private file)
  • List -a with WinSCP.docx (241.51 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,852
Location:
Prague, Czechia

Re: Can't access the file or directory error. LIST -a command

The correct path to the file seems to be A:/Listy/Lista9.csv. So use that in Session.GetFileToDirectory call. If that does not help, please post session log file (not the debug log).

Reply with quote

Magda
Donor
Joined:
Posts:
4
Location:
Poland

Reply

Please find session logs with command session.GetFileToDirectory(GetFileFromPath, DestPath)
Dim GetFileFromPath As String = "A:/Listy/Lista9.csv"
  • SessionLog.xml (955 Bytes, Private file)
  • Log.txt (40.16 KB, Private file)
  • print_wireshark.docx (324.24 KB, Private file)

Reply with quote

Magda
Donor
Joined:
Posts:
4
Location:
Poland

File for session.SessionLogPath

Sorry, now right log is attached.
  • SessionLog.txt (12.3 KB, Private file)

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum