Start Command Prompt and automatically execute a few commands

Tomha

New member
Member
VIP
Local time
4:04 PM
Messages
391
Location
Auckland, New Zealand
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Professional 64bit
CPU
Intel i7 3770k 3.5ghz
Motherboard
Asus P8Z77-V Deluxe
Memory
Corsair Vengeance 16gb (4x4gb)
Graphics Card(s)
Gigabyte G1 Gaming GTX970
Sound Card
None
Monitor(s) Displays
3x AOC 12367fh 23"
Screen Resolution
1920x1080
Hard Drives
Western Digital Caviar Black 1TB - 64mb cache
Western Digital Caviar Green 1TB - 32mb cache
Samsung 830 SSD 128Gb Boot Drive
PSU
Corsair AX-860W ATX
Case
Corsair 500R black
Cooling
Corsair 500r Stock cooling (3x120mm, 1x200mm) & Corsair H100
Keyboard
Logitech G110 gaming keyboard
Mouse
Logitech G500s
Other Info
Corsair Hydro 100 CPU Cooler

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Golden Mk. I.4
OS
Windows 10 Pro x64 ; Xubuntu x64
CPU
Intel i7 860 @ 2.80 GHz O/C'ed to 4.0GHz
Motherboard
Gigabyte P55A-UD3R Rev.1. Award BIOS F13
Memory
16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24)
Graphics Card(s)
EVGA NVidia GTX 560 1024MB
Sound Card
Realtek Integrated
Monitor(s) Displays
Dual Samsung SyncMaster 2494HS
Screen Resolution
1920*1080 and 1920*1080
Hard Drives
1*Samsung 840 EVO 120GB SSD;
1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
1*Samsung F1 SpinPoint 1TB;
2*Western Digital 1TB External USB 3.0
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0
PSU
Thermaltake ToughPower QFan 750W
Case
Thermaltake Element S VK60001W2Z
Cooling
Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans
Keyboard
Logitech G110
Mouse
Logitech MX518
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Professional 64bit
CPU
Intel i7 3770k 3.5ghz
Motherboard
Asus P8Z77-V Deluxe
Memory
Corsair Vengeance 16gb (4x4gb)
Graphics Card(s)
Gigabyte G1 Gaming GTX970
Sound Card
None
Monitor(s) Displays
3x AOC 12367fh 23"
Screen Resolution
1920x1080
Hard Drives
Western Digital Caviar Black 1TB - 64mb cache
Western Digital Caviar Green 1TB - 32mb cache
Samsung 830 SSD 128Gb Boot Drive
PSU
Corsair AX-860W ATX
Case
Corsair 500R black
Cooling
Corsair 500r Stock cooling (3x120mm, 1x200mm) & Corsair H100
Keyboard
Logitech G110 gaming keyboard
Mouse
Logitech G500s
Other Info
Corsair Hydro 100 CPU Cooler
Back
Top