Topic "GET in scripting gives error - Script: Failed - (WinSCP v5.11.2)"

Author Message
JorgeBarosa
[View user's profile]

Joined: 2017-04-04
Posts: 1
Location: Portugal
Hello,

I found a BUG, this is the script (WinSCP v5.11.2):

WinSCP.com /console /script="C:\Cindy\pockets_recebe_winscp.ftp"

open ftp://xxxxx:*****@111.222.333.444.555
lcd C:\Cindy\Temp
cd envios
get 00equipinterval.txt
get 00modelequip.txt
get 054DlvUNLJM.*
get 054Prd*
get 054LocalVen.*
get 054SRA*
rm 054DlvUNLJM.*
rm 054Prd*
rm 054LocalVen.*
rm 054SRA*
rm 00equipinterval.txt
rm 00modelequip.txt
lcd %ScorpioPath%\Temp
get del*
rm del*
cd ..
exit


If the file 00equipinterval.txt or 00modelequip.txt does not exist it gives error, and stops the rest of the script!

The complete error is in the LOG file attached.

> 2017-11-15 09:37:52.206 Script: get 00equipinterval.txt
> 2017-11-15 09:37:52.206 Script: Parameter: 00equipinterval.txt
. 2017-11-15 09:37:52.206 Listing file "00equipinterval.txt".
. 2017-11-15 09:37:52.207 Retrieving file information...
> 2017-11-15 09:37:52.207 PWD
< 2017-11-15 09:37:52.256 257 "/" is current directory.
> 2017-11-15 09:37:52.256 CWD /envios/00equipinterval.txt
< 2017-11-15 09:37:52.302 550 The system cannot find the file specified.
> 2017-11-15 09:37:52.303 TYPE I
< 2017-11-15 09:37:52.356 200 Type set to I.
> 2017-11-15 09:37:52.356 SIZE /envios/00equipinterval.txt
< 2017-11-15 09:37:52.404 550 The system cannot find the file specified.
. 2017-11-15 09:37:52.404 Could not retrieve file information
. 2017-11-15 09:37:52.404 Got reply 4 to the command 1024
< 2017-11-15 09:37:52.404 Script: Can't get attributes of file '00equipinterval.txt'.
< 2017-11-15 09:37:52.404 Could not retrieve file information

< 2017-11-15 09:37:52.404 The system cannot find the file specified.
. 2017-11-15 09:37:52.405 Script: Failed
. 2017-11-15 09:37:52.405 Session upkeep
. 2017-11-15 09:37:52.405 Script: Exit code: 1
. 2017-11-15 09:37:52.405 Script: Max roundtrip: 16
. 2017-11-15 09:37:52.405 Got reply 1004 to the command 1024
. 2017-11-15 09:37:52.407 Disconnected from server
pockets_recebe_winscp.log (6.53 KB) [Download]

Description: (none)

martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
That's by design.
You can use option batch on to change that.
https://winscp.net/eng/docs/scriptcommand_option
Guest




martin wrote:
That's by design.
You can use option batch on to change that.
https://winscp.net/eng/docs/scriptcommand_option


It worked with option batch on, i thinked it was a bug Very Happy

Thanks
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License