Woomera Posted October 11, 2005 Share Posted October 11, 2005 ok i know this is a newbie question but i searched windows help but couldnt find the answer.i wanna make a batch file that open an specified file in command prompt i mean first open the cmd and open the file in it. whats the commands?thanks. Link to comment Share on other sites More sharing options...
InTheWayBoy Posted October 11, 2005 Share Posted October 11, 2005 Well, what kinda file are you looking to open up? I think I see where you are going, but I can't see the reason to open a file IN the command window. Am I missing something?The 'call' command is used to access/open a file from within a batch file...you can use it to open another batch file, or open a file. But, if you were to call an xls (Excel) file, it won't open in the command window it will open in the default program...Excel in this case. Link to comment Share on other sites More sharing options...
Woomera Posted October 12, 2005 Author Share Posted October 12, 2005 no you see,there is this .exe file that only can be run in cmd.i donr want that everytime open the cmd and then type the file path and then run it,so thought maybe i can make a batch file that run the file in cmd for me(ex:run the cmd first and then run the file in it). Link to comment Share on other sites More sharing options...
glent Posted October 12, 2005 Share Posted October 12, 2005 ok where is the file located?like c:\foldername\file.exe Link to comment Share on other sites More sharing options...
nakira Posted October 12, 2005 Share Posted October 12, 2005 cmd.exe /k "X:\path\file.exe" Link to comment Share on other sites More sharing options...
Woomera Posted October 13, 2005 Author Share Posted October 13, 2005 thanks ankara,thanks you all for a perfect community. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now