1

I want o use MEGAcmd script in my batch file (CMD scipt). Everything in that batch works well, but MEGAcmd scipt not. It looks like this:

SET PATH=C:\Users\PC_USER\AppData\Local\MEGAcmd;%PATH%
mega-login mail password
mega-cd my-backup
mega-put E:\BACKUP_TEMP
mega-logout

When i open it from .bat file I see login line and after some while window closed and nothing happen after that. But when i open CMD from start menu and paste in that windows this script line by line everything works good. Why, what I'm, doing wrong?

Thanks for help

Arlid
  • 21

1 Answers1

0

In Batch, once the interpreter gets to the last line, it doesn't know what else to do, because you didn't give it anything else to do, so it just closes itself out. However, that doesn't mean it didn't do everything right. It most likely ran through all the lines of code successfully, then closed out. It just doesn't tell you every step of what it's doing, it just does what it's told to do then closes out.

I don't know much about MEGAcmd, but if it gives any verbose after it runs a line of code, you'll be able to see it by adding a pause command at the very end.

If it still closes itself out after that, tell me, and I will give you an alternative.