MySQL command line client implements some functionality/commands that are not SQL commands themselves. Maybe the “source” command should be implemented in SQLyog editor? I am not sure.
If you are running MySQL 5 you can put the batch script in a stored procedure and CALL it(). That is the “standard” way to do it.