Solved

HELP creating a .bat file

Posted on 2013-06-19
7
351 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

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:lionelmm
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article describes how to set permissions to allow a limited-permissions user to start and stop a particular System Service.   It is always best to give users only the permissions that they need to perform their job, so tweaking particular permi…
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…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now