"cannot find the path specified" - even if it exists
I'm using WinSCP 5.17.10 on a Windows 10 computer and I call the DLL with PowerShell.
With the
This line of PowerShell script is executed:
But this does not work, a session log of this transfer shows:
Simply said: this session cannot change to any folder on the remote computer except to the root /.
But connecting to this server with the WinSCP-GUI version I see this directory /ftp102050957-3/20 as the screenshot 29-05-_2021_17-44-16.png (below) shows.
And the log of the WinSCP-GUI is different:
With the GUI version the CWD
What makes the difference???
I want to point at the fact that the session is run using FTP with FTPS-Mode "Implicit" – and we noticed that sometimes actions on folders cause such "not found" or "can't access" problems, in WinSCP and other software like FileZilla.
With the
PutFiles
method files selected by the wildcard 20*.ics
should be transferred to the folder /ftp102050957-3/20/
in the target FTPS server
This line of PowerShell script is executed:
$session.PutFiles("C:\LocalData\Uploads\20*.ics", "/ftp102050957-3/20/")
But this does not work, a session log of this transfer shows:
. 2021-05-29 17:21:58.313 Binary transfer mode selected. . 2021-05-29 17:21:58.313 Upload of C:\LocalData\Uploads\20_20210516122829.ics is started > 2021-05-29 17:21:58.313 CWD /ftp102050957-3/20 < 2021-05-29 17:21:58.337 550 The system cannot find the path specified. > 2021-05-29 17:21:58.337 CWD /ftp102050957-3 < 2021-05-29 17:21:58.361 550 The system cannot find the file specified. > 2021-05-29 17:21:58.361 CWD / < 2021-05-29 17:21:58.385 250 CWD command successful. > 2021-05-29 17:21:58.385 MKD ftp102050957-3 < 2021-05-29 17:21:58.409 550 Access is denied. > 2021-05-29 17:21:58.409 CWD /ftp102050957-3 < 2021-05-29 17:21:58.433 550 The system cannot find the file specified. . 2021-05-29 17:21:58.433 Copying of files to the remote computer did not work (translated from German)
Simply said: this session cannot change to any folder on the remote computer except to the root /.
But connecting to this server with the WinSCP-GUI version I see this directory /ftp102050957-3/20 as the screenshot 29-05-_2021_17-44-16.png (below) shows.
And the log of the WinSCP-GUI is different:
. 2021-05-29 17:53:02.133 Startup conversation with host finished. . 2021-05-29 17:53:24.174 Cached directory change via "20" to "/ftp102050957-3/20". . 2021-05-29 17:53:24.174 Getting current directory name. . 2021-05-29 17:53:24.177 Retrieving directory listing... > 2021-05-29 17:53:24.177 CWD /ftp102050957-3/20 < 2021-05-29 17:53:24.199 250 CWD command successful.
/ftp102050957-3/20
is successful while with the assembly CWD /ftp102050957-3/20
results in "550 The system cannot find the path specified."
What makes the difference???
I want to point at the fact that the session is run using FTP with FTPS-Mode "Implicit" – and we noticed that sometimes actions on folders cause such "not found" or "can't access" problems, in WinSCP and other software like FileZilla.