Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Re: Script Failed of WinSCP

As documented:

It is an error, if the command has any error output, but no standard output. To circumvent that redirect the error output to nul (2>/dev/null) or to the standard output (2>&1).


Script Failed of WinSCP

Have script with unknown reason of error. Run winscp commands from windows .bat file.

here is the script code from windows .bat file

winscp.exe /console /log=winscp.log /command ^
"open %server_access% -timeout=720" ^
"call echo 'Creating DRUSH backup...'" ^
"cd %drupal_base_path%" ^
"call drush @%project% bb" ^
"call echo 'Done'" ^
"call echo 'Downloading dump file...'" ^
"cd %server_dump_file_path%" ^
"get %dump_file_name_zip% %backup_file_path_zip%" ^
"call echo 'Done'" ^
"call echo 'Removing dump files...'" ^
"cd %server_dump_file_path%" ^
"call rm %dump_file_name_zip%" ^
"call rm" ^
"call echo 'Done'" ^
"close" ^

script failed after command "call drush @%project% bb"

Using last WinSCP 5.7.4 on windows 7. Session log file is attached.

All was OK on WinSCP 4.2.9 !