1 Introduction

💻 Windows Command Prompt (cmd.exe) is the default command-line interpreter for Windows.
This guide collects the main commands to navigate, manage files, and check system info efficiently.


3 File Management

Command Description Example
copy Copy files copy file.txt backup.txt
move Move or rename files move file.txt C:\Data\file.txt
del Delete files del old.txt
type Display file contents type notes.txt
more Scroll through file content type long.txt \| more
REM Practical example
copy file.txt backup.txt       REM copies a file
move file.txt C:\Data\file.txt REM moves or renames a file
del old.txt                    REM deletes a file
type notes.txt                 REM displays content of a file
type long.txt | more           REM scrolls through file content
⚠️ Warning: Use del carefully as it permanently deletes files.

4 System Information

Command Description Example
systeminfo Display detailed system information systeminfo
ver Show Windows version ver
hostname Show computer name hostname
echo %USERNAME% Show current user echo %USERNAME%
tasklist List running processes tasklist

5 Disk and Directory Utilities

Command Description Example
chkdsk Check disk for errors chkdsk C:
diskpart Disk partition tool diskpart
tree Show folder structure tree C:\Users\YourName /F
fsutil Advanced file system info fsutil fsinfo drives

6 Networking Commands

Command Description Example
ping Test network connectivity ping google.com
ipconfig Display IP configuration ipconfig /all
tracert Trace route to host tracert google.com
netstat Show active connections netstat -an
nslookup DNS query nslookup example.com

7 Environment Variables

Command Description Example
set List or set environment variables set PATH
echo Display messages echo Hello World
pause Pause script execution pause
exit Close the command prompt exit
✅ Note: Combine commands using && or | for conditional execution or piping output.


⬅ Back to Home