1.

Solve : Help with a simple batch file?

Answer»

Hi guys. I am trying to create a simple batch file. Batch file is going to do as follows

Once i click it, it will START the cmd in a certain location, and after that it should ask to user to execute a command within the same location. Here is what i have figure til now.

To start the cmd in certain location i have used the following command:

START cmd.exe /k "cd C:\Program Files\Symantec\Symantec DLO"

But when i try to get it to execute a command in that same location, for some reason it POPS up With another CMD window giving me the error sayint that this command is not recognized, obviously because the .exe file lays in the location i want cmd to start in.

Here is how my batch file looks like:



@echo off


START cmd.exe /k "cd C:\Program Files\Symantec\Symantec DLO"

pause

start DLOCommandu -ListMachines -V > C:\list.txt

Seriously, nobody can help?Maybe I'm necroposting... I don't think many PEOPLE look in the Windows Server section, and although you may intend to run the batch on a server OS, the QUESTION really is a generic batch one.

You don't need all those START commands.

@echo off
cd /d "C:\Program Files\Symantec\Symantec DLO"
pause
DLOCommandu -ListMachines -V > C:\list.txt



Discussion

No Comment Found