Solved

HELP creating a .bat file

Posted on 2013-06-19
7
353 Views
Last Modified: 2013-07-17
Trying to make C:\Program Files\Symantec\BackUp Exec>bemcmd -o503 a .bat file please help.
0
Comment
Question by:ManieyaK_
7 Comments
 
LVL 11

Expert Comment

by:David Kroll
ID: 39259428
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
0
 
LVL 95

Accepted Solution

by:
Lee W, MVP earned 500 total points
ID: 39259443
Create a text file with a .cmd extension and put the following lines in it:

@echo off
"C:\Program Files\Symantec\BackUp Exec\bemcmd" -o503

Open in new window


(The Echo off is generally unnecessary, but I put it in almost all my batch files)

Note: you need to save the batch file in a folder that's included in the PATH environment variable - any folder should work so long as it's in the path.  (I usually use C:\Windows\System32).

To see what folders are in your path, at a command prompt, type echo %path%
0
 

Author Comment

by:ManieyaK_
ID: 39261158
Are the " marks necessary?
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:ManieyaK_
ID: 39261168
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%
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 39261276
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.

echo path
0
 
LVL 24

Expert Comment

by:Lionel MM
ID: 39262201
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
0
 

Author Comment

by:ManieyaK_
ID: 39266886
leew -

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

Thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article covers how to install the Microsoft Windows Operating System (OS). What is covered in this article:  > Different Versions and Editions of the Windows OS  > Upgrading versus Fresh Installation of the OS           - Steps to take pr…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question