Scripting get command executing invalid commands causing missed files

Advertisement

kbannert
Guest

Scripting get command executing invalid commands causing missed files

i have written a script that by default runs with option batch continue as a stop gap incase one of the ftp server i connect to errors out.
i have noticed that recently, the get command, when provided a full remote path with filename is causing errors with some ftp servers.
i have it written as such:
get "/Remote/Path/to/System.ini" "C:\Local\Path\for\System.ini"
in the logs, its executed as such:
Script: get "/Remote/Path/to/System.ini" "C:\Local\Path\for\System.ini"
.  Listing file "/Remote/Path/to/System.ini".
.  Retrieving file information...
>  PWD
<  257 "/"
>  CWD /Remote/Path/to/System.ini
<  550 Requested action not taken: internal server error
>  TYPE I
<  200 Type set to I.
>  SIZE /Remote/Path/to/System.ini
<  550 Requested action not taken: internal server error
.  Could not retrieve file information
<  Script: Can't get attributes of file '/Remote/Path/to/System.ini'.
<  Could not retrieve file information
as you can see, the CWD is including the filename as a directory that can be changed to. i had attempted to mitigate this by changing my script to the following:
cd "/Remote/Path/to/"
get System.ini "C:\Local\Path\for\System.ini"
yet the get command still performs the CWD with the full path that i had JUST done a CD prior to attempt to bypass this bug with.per the logs
> Script: cd "/Remote/Path/to/"
. Changing directory to "/Remote/Path/to/".
> CWD /Remote/Path/to/
< 250 Requested File Action Completed OK
. Getting current directory name.
> PWD
< 257 "/Remote/Path/to"
< Script: /Remote/Path/to
> Script: get System.ini "C:\Local\Path\for\System.ini"
. Listing file "/Remote/Path/to/System.ini".
. Retrieving file information...
> PWD
< 257 "/Remote/Path/to"
> CWD /Remote/Path/to/System.ini
< 550 Requested action not taken: internal server error
> TYPE I
< 200 Type set to I.
> SIZE /Remote/Path/to/System.ini
< 550 Requested action not taken: internal server error
. Could not retrieve file information
< Script: Can't get attributes of file 'System.ini'.
< Could not retrieve file information
the servers(4)im dealing with that throw this error use Twisted 15.5.0 FTP Server. this also errors on Windows 9x/NT FTP server, however the server still responds to the size command properly and allows the transfer of the file. the feature set im limited to is as follows:
< 211-Features:
<  FEAT
<  MDTM
<  PASV
<  SIZE
<  TYPE A;I
this issue dose not occur on the Unix emulated FileZilla FTP Server, as i see it properly performing a CWD without the file included as a directory. Is there a way to fix this?.

Reply with quote

Advertisement

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

Re: scripting get command executing invalid commands causing missed files

Thanks for your report.

Can you send me an email, so I can send you back a development version of WinSCP for testing? Please include a link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.

Reply with quote

Advertisement

You can post new topics in this forum