Solved

HELP creating a .bat file

Posted on 2013-06-19
7
352 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

My purpose is to describe the basic concepts of virtual memory as implemented in a modern Windows-based operating system. I will also describe the problems inherent in older systems and how virtual memory solves them. The dark ages - before virtu…
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…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
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…

863 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

17 Experts available now in Live!

Get 1:1 Help Now