Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

HELP creating a .bat file

Posted on 2013-06-19
7
354 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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 25

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sbs 2011 6 27
remove a bios password from a lenovo think pad  x120e 9 497
How do I change a windows 7 user name? 7 51
Windows 2003 Split DNS solution ? 3 51
Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
This is a little timesaver I have been using for setting up Microsoft Small Business Server (SBS) in the simplest possible way. It may not be appropriate for every customer. However, when you get a situation where the person who owns the server is i…
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…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

861 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