create automatic batch

leostor

Honorable
Oct 25, 2013
1
0
10,510
Hi all
I need to create an executable file (. bat) to start an automatic backup of a program, then I'll have to set the batch to start it with the windows task scheduler, the command to be executed a bacckup is in this path C: \ManageEngine\OpManager\ bin \ backup \ " the executable file in this path to run ( for export backup to another disk E: ) is " BackupDB.bat-mode e: \ backupdb "

how can I create a batch file? I tried with:

@ echo off
start "C: \ ManageEngine \ OpManager \ bin \ backup" BackupDB.bat-mode to e: \ backupdb "

but it gives me error, does anyone have any advice?

thanks
 
Are you using spaces in the code like you are showing here? If you are, delete the extra spaces. You have two different quotes you put in but only 3 of them, you need both opening and closed quotes. Also, the .bat file you have, there should not be a -mode right after it, if there are any switches you need a space after it. You can put the full path in a single quote, you don't need both. Actually, you don't need any quotes from what I see since there are no spaces in the path name you are using.