Command Prompt is also helpful for performing some very useful works which are not possible with normal GUI, such as deleting viruses, showing your ip and full system configuration, booting windows in safe mood, making visible any hidden file or folders which are suspicious and take action against them. Command Prompt is undoubtedly a must for all programmers. So, in this article I am going to show you some very common and basic commands in windows command prompt.
Common Commands in Windows Command Prompt:
Intoduce Yourself with Command Prompt:
Press Windows+R and write cmd in it and press Enter.Now a window will open which is known as cmd. Write whoami and press enter you will see your pc username as the first picture in this article.
View System Info:
To see detailed system info of your PC write systeminfo in CMD and press enter.Open a Directory and View all Files:
Open CMD and write a drive name with colon(:). As an example F: and press enter. then write dir and you will see all files and folders remaining in the root of this drive. You can now go to any other folder or directory on the drive. As an example in my F: drive I have a folder named techweb24 and if I want to go inside the folder I have to write cd techweb24 . (here cd means change directory)Open File with Command Prompt:
Go to a directory and view files and folders with dir command. Then if you want to open a file write filename and press enter. It's for file name with single word. If the file or folder name contains more than one word then you need to enclose the file name with a doble quotation(""), which will be like as "new file". As as example if you want to open a file named bangle rap.mp4, I have to write "bangle rap.mp4 and press enter to open this video file".Delete File with Command Prompt:
Go to a directory and view files and folders with dir command. Then if you want to delete a file or folder write del foldername or del filename. It's for file or folder name with single word. If the file or folder name contains more than one word then you need to enclose the file or folder name with a doble quotation(""), which will be like as del "new folder". As as example if you want to delete a file named bangle rap.mp4, I have to write del "bangle rap.mp4 to delete this file".There an another way to delete file easily with address. It's less time consuming. Open CMD and write del "file address". As an Example if I want to delete a file named as new file.txt which is situated in F: drive, I need to write del "F:\new file.txt"
Remove a Directory with CMD:
Write rd /s directory name or rd /s "directory name" (here rd means remove directory).Example: rd /s techweb24 or rd /s "new folder"
Task kill with CMD:
Write tasklist in CMD, it will show full Task List.Now if you want to kill a task or software(known as image), write taskkill /im taskname .Example: taskkill /im notepad.exe
Make hidden files and folders visible with CMD:
It's a very important command for deleting viruses without clicking on them. Open CMD go to the directory or pendrive where you want see hidden files files visible,then write this command attrib -s -r -h *.* /s /d /l and press enter. Now go to your directory you will see all hidden files and you can use or delete them.
Do not forget to subscribe us!
Sign up here with your email
2 comments
Write commentsOutstanding post!
ReplyYou described it well.
ReplyConversionConversion EmoticonEmoticon