

InterviewSolution
Saved Bookmarks
1. |
Solve : Help with a simple batch file? |
Answer» <html><body><p>Hi guys. I am trying to create a simple batch file. Batch file is going to do as follows<br/><br/>Once i click it, it will <a href="https://interviewquestions.tuteehub.com/tag/start-239994" style="font-weight:bold;" target="_blank" title="Click to know more about START">START</a> 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.<br/><br/>To start the cmd in certain location i have used the following command:<br/><br/>START cmd.exe /k "cd C:\Program Files\Symantec\Symantec DLO"<br/><br/>But when i try to get it to execute a command in that same location, for some reason it <a href="https://interviewquestions.tuteehub.com/tag/pops-592284" style="font-weight:bold;" target="_blank" title="Click to know more about POPS">POPS</a> 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.<br/><br/>Here is how my batch file looks like:<br/><br/><br/><br/>@echo off <br/><br/><br/>START cmd.exe /k "cd C:\Program Files\Symantec\Symantec DLO"<br/><br/>pause <br/><br/>start DLOCommandu -ListMachines -V &<a href="https://interviewquestions.tuteehub.com/tag/gt-249387" style="font-weight:bold;" target="_blank" title="Click to know more about GT">GT</a>; C:\list.txt<br/><br/>Seriously, nobody can help?Maybe I'm necroposting... I don't think many <a href="https://interviewquestions.tuteehub.com/tag/people-238015" style="font-weight:bold;" target="_blank" title="Click to know more about PEOPLE">PEOPLE</a> look in the Windows Server section, and although you may intend to run the batch on a server OS, the <a href="https://interviewquestions.tuteehub.com/tag/question-25051" style="font-weight:bold;" target="_blank" title="Click to know more about QUESTION">QUESTION</a> really is a generic batch one.<br/><br/>You don't need all those START commands.<br/><br/>@echo off<br/>cd /d "C:\Program Files\Symantec\Symantec DLO"<br/>pause<br/>DLOCommandu -ListMachines -V > C:\list.txt<br/></p></body></html> | |