Blog Archive
30+ Windows Command Prompt Tricks

30+ Windows Command Prompt Tricks Every User Should Know
Despite the rise of graphical interfaces, the Windows Command Prompt (CMD) remains an incredibly powerful tool. In this guide, we explore useful, hidden, and fun CMD tricks to help you get more from your Windows system.
Essential Basic Windows Command Prompt Commands with Examples
Below are some fundamental Windows CMD commands with their descriptions and practical examples to help you understand and use them effectively:
- dir – Lists all files and folders in the current directory.
Example:dir
(Displays the contents of the current folder) - cd – Changes the current directory.
Example:cd Documents
(Navigates to the Documents folder) - cls – Clears the Command Prompt screen.
Example:cls
(Clears all previous commands and output) - copy – Copies one or more files from one location to another.
Example:copy file.txt D:\Backup\
(Copies file.txt to the Backup folder on D drive) - del – Deletes one or multiple files permanently.
Example:del oldfile.txt
(Deletes the file named oldfile.txt) - move – Moves files or folders to a different directory.
Example:move report.docx D:\Reports\
(Moves report.docx to the Reports folder) - mkdir – Creates a new folder (directory).
Example:mkdir NewFolder
(Creates a new folder named NewFolder) - rmdir – Removes an empty directory.
Example:rmdir OldFolder
(Deletes the empty folder named OldFolder) - ren – Renames a file or directory.
Example:ren file1.txt file2.txt
(Renames file1.txt to file2.txt) - ipconfig – Displays network configuration information.
Example:ipconfig
(Shows IP address and network details)
Essential CMD Tricks
- Run CMD as Admin: Right-click on Command Prompt → “Run as administrator”.
- Keyboard Shortcuts: Use Ctrl+C (cancel), Ctrl+V (paste), Up Arrow (history), Tab (autocomplete).
- IP Commands:
ipconfig /all
ipconfig /release
ipconfig /renew
Network & Internet Diagnostics
ping google.com
– Test internet connection.tracert google.com
– Trace the route to a website.net statistics workstation
– View system uptime.
File & Folder Management
mkdir folder1\folder2\folder3
– Create nested folders instantly.dir /s /b
– List all files and folders recursively.attrib +h +s "C:\path\to\folder"
– Hide folder (and reverse with -h -s).fc file1.txt file2.txt
– Compare text files line-by-line.
System Tools & Shortcuts
systeminfo
– Display full system details.shutdown /s /t 60
– Shutdown in 60 seconds. Use/a
to cancel.tasklist
andtaskkill /im notepad.exe /f
– Manage processes.cd folder && dir
– Combine commands with&&
.
Power User Tricks
net user UserName password /add
– Add new user.netsh interface ip set address "Ethernet" static 192.168.1.10 255.255.255.0 192.168.1.1
robocopy C:\Source D:\Backup /MIR
– Backup using Robocopy.
Geeky Tricks
telnet towel.blinkenlights.nl
– Watch ASCII Star Wars.md \\.\C:\con\test
– Create undeletable folder using reserved names.msg * "Hello from CMD!"
– Send popup message.
Download Files from the Internet
powershell -command "(New-Object System.Net.WebClient).DownloadFile('https://example.com/file.jpg', 'C:\Users\YourName\Downloads\file.jpg')"
Bonus: Custom Batch Menu
@echo off
:menu
cls
echo 1. Show Clock
echo 2. Roll Dice
echo 3. Open Notepad Loop
echo 4. Exit
set /p choice=Choose an option:
if %choice%==1 powershell -command "while ($true) {clear; get-date; start-sleep -s 1}"
if %choice%==2 call :roll
if %choice%==3 call :loop
if %choice%==4 exit
goto menu
:roll
set /a num=%random% %% 6 + 1
echo You rolled %num%
pause
goto menu
:loop
:repeat
start notepad
goto repeat
These Command Prompt tricks for Windows are powerful, fun, and practical. Use them to automate tasks, customize your terminal, impress friends, or boost productivity. Whether you’re new to CMD or a curious user, these commands unlock the full potential of your system.
Mastering these Command Prompt commands, like the ones featured in this article, can be the key difference between an amateur and a professional computer user, and the faster execution speed of commands in this environment only adds to its advantage.
Why is command execution faster in CMD?
Reason | Explanation |
---|---|
⏱ No graphical interface | CMD is text-based and does not require loading images, icons, or a graphical user interface (GUI). |
⚙ Direct execution | Many operations (such as running scripts, deleting files, or checking network status) send commands directly to the operating system, bypassing extra layers. |
🧠 Lower memory usage | CMD consumes very little RAM, leaving more system resources available for executing tasks. |
🔁 Automation capability | Commands can be executed in quick, repetitive sequences without user intervention, boosting overall speed. |