Reputation: 267
(drush cc all) && (drush sql-dump --result-file=%backupdir%/%tarname%)
The above is executed but not the below command.
Can I run the below command using '&&' as well?
echo user username> ftpcmd.dat
echo password>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo put %backupdir%/%tarname% /Backup/%tarname%>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat ftpserver
del ftpcmd.dat
I just need the ftp commands to execute after a successful database dump.
Thanks.
Upvotes: 1
Views: 1205
Reputation: 70923
You have not indicated what drush
is, but probably it is a .bat
or .cmd
file. When a batch file invokes another batch file execution flow is transfered to the called one, but does not return to the caller.
You need to use call drush ...
. The call
command will return execution flow to the caller when the called one has ended
Upvotes: 1