Link to home
Start Free TrialLog in
Avatar of ManieyaK_
ManieyaK_Flag for United States of America

asked on

HELP creating a .bat file

Trying to make C:\Program Files\Symantec\BackUp Exec>bemcmd -o503 a .bat file please help.
Avatar of David Kroll
David Kroll
Flag of United States of America image

Just create a text file, name it whatever you want.bat, edit and put this line in.

C:\Program Files\Symantec\BackUp Exec\bemcmd -o503
ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ManieyaK_

ASKER

Are the " marks necessary?
leew,

Could you provide an example to your previous post please?

To see what folders are in your path, at a command prompt, type echo %path%
Yes, the quotes are necessary else the batch file thinks the command is
C:\Program is the command and Files\Symantec\BackUp Exec\bemcmd are parameters.

User generated image
I suggest you add a few lines. Any comment lines to help you remember what you were trying to do or when can be inserted as long as you place rem or Rem or REM at the start of the line. I also suggest you use the Start command that way the program starts and the cmd exe can close. And just as good practice I also suggest you include the Exit command when using batch files, not required just suggested. Just copy the attached file and either double click on it from Windows explore or run it from a dos window. Just rename it from test.txt to test.bat

@Echo Off
Rem Created by
Rem Used to start
Rem Date and date changes made

Start "C:\Program Files\Symantec\BackUp Exec\bemcmd" -o503
Exit
Test.txt
leew -

So why no " around -o503?
just trying to figure this out for future reference having a hard time crasping the concept.

Thanks