I have a automated.bat with the following lines:
cd C:\Users\user\Downloads\megatools-1.9.97-win64\megatools-1.9.97-win64\
megacmd.bat
megals /Root --username username@email.domain --password password
megamkdir /Root/testmake2 --username username@email.domain --password password
It will happily say the megacmd.bat is Megatools Shell, but then it won't excecute the commands that follow.
I figured it might be because the megacmd.bat is in a different programming language, hence the incomming commands aren't valid.
So I tried to fit it all in 1 line with:
cd C:\Users\a\Downloads\megatools-1.9.97-win64\megatools-1.9.97-win64\
megacmd.bat & megals /Root --username username@email.domain --password password & megamkdir /Root/testmake2 --username username@email.domain --password password
but that didn't do anything with the commands either so I also tried:
cd C:\Users\a\Downloads\megatools-1.9.97-win64\megatools-1.9.97-win64\
megacmd.bat & "megals /Root --username username@email.domain --password password" & "megamkdir /Root/testmake2 --username username@email.domain --password password"
And
cd C:\Users\a\Downloads\megatools-1.9.97-win64\megatools-1.9.97-win64\
megacmd.bat "megals /Root --username username@email.domain --password password" & "megamkdir /Root/testmake2 --username username@email.domain --password password"
And
cd C:\Users\a\Downloads\megatools-1.9.97-win64\megatools-1.9.97-win64\
megacmd.bat megals /Root --username username@email.domain --password password & megamkdir /Root/testmake2 --username username@email.domain --password password
But I can't seem to get the syntax right. What would be the command to have the megacmd.bat run and execute the above 2 commands consecutively?
your line
starts
megacmd.bat
and gives control to it. It never returns to yourautomated.bat
.You should
to return control to your first
.bat
aftermegacmd.bat
finishes.