Start Command Prompt and automatically execute a few commands


  1. Posts : 391
    Windows 7 Professional 64bit
       #1

    Start Command Prompt and automatically execute a few commands


    I am learning a programming language, and I frequently use command prompt to compile source codes, but every time I start command prompt I need to manually cd to the correct directory, and then I like to run cls to keep the window clean. I have looked around, but I'm not sure how to phrase a google search to get the right results >.<, so could anyone tell me how I would start a command prompt, then run the "cd [location]" and "cls" commands automatically?

    Thanks,
    Tom
      My Computer


  2. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
       #2

    I'm not sure that is possible, but Option 2 here might help with the cd/ bit:

    Command Prompt
      My Computer


  3. Posts : 391
    Windows 7 Professional 64bit
    Thread Starter
       #3

    Its not a bad solution, but it would be nice if I could then create a shortcut from that so I can have it pinned to my taskbar.

    Thanks for the suggestion :)
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:40.
Find Us