Scan the technology
Keyboard Shortcuts List
How to: Command Windows with C
There are lot of things that can be done using bat codes. Ex: delete a file, move, copy files,format drives, show message box, end processes, start a program, shutdown, etc
if considering C language, we all know it is strict, and difficult to use. But if we use some system commands with this, it becomes interesting-funny and easy. We can easily execute external programs or commands and show results in console. For example, if we take file reading example, it's becomes little bit lengthy in C. But if we use the command 'TYPE [FILENAME]" from windows, then we can finish it off with a single line!!
In C (or C++) programming, we can execute windows commands ( or commands related to any other OSes) using ' system(); ' function. You have to include the header file 'iostream.h' for this function.
On the basis of this, I've given some examples for you:
Example 1: Shutdown Windows
Example 2: Show Special folders path