|
Answer» Hi,
A simple question. I read the batch file description but my question remained:
I want to create a BAT file that when i click on it then the following should happen:
Run from the command.com program, which is in the directory c:\windows\system32, another DOS program (called program1.exe) that is in the directory c:\folder1\folder2 for example?
How i can do that? What commands do i have to write inside the bat file.......?
Because now i have to go to the c:\windows\system32, go to command.com and type the whole c:\folder1\folder2 and then type program1.exe. Not very convenient................:-)
Thanks.......George:
A batch file is essentially a batch of DOS commands. Whatever you can type at the command prompt, you can type in a batch file. Windows will execute the commands one at a time in the order they appear in the file. Use Notepad, type each command on a separate LINE, pressing the Enter key after each command. Save the file as:
filename.bat
Make sure you choose to save as All Files and then add the .bat extension to the file name.
Doc A batch file is essentially a batch of DOS commands.
Oh REALLY? So i can just write: START /M "C:\folder1\folder2\program.exe"
Or anything else. Program1.exe is a DOS program. Does it MATTER?No, but you may, for example, put this in a batch file:
start /max c:\windows\notepad.exe
And save it to the desktop with a .bat extension. Double-clicking this batch file on the desktop would start Notepad maximized.
For the correct parameters to use with the START command, type this at the command prompt:
START /?
Best regards, DocBTW: You may EVEN use a batch file to launch a shortcut. Just put a .LNK after the shortcut's name in the batch file command.
Doc
|