Top 10 Most Useful batch files for windows | You can create to automate tasks on Windows 11

Learn about the 10 most useful batch files for Windows that can make your work easy and fast. Batch files are simple scripts that help you do tasks.

Batch files are small scripts in Windows that let you automate boring tasks. Instead of repeating the same steps again and again, you can just double-click a batch file and the work will be done automatically.

Here are 10 super useful batch file ideas that can make your daily work easier. I’ll explain what each file does, how to save it.

In the end, I've shared a link where you can directly download all of them.





1. Temporary Files Cleaner

This batch file deletes all temporary files and helps boost your PC’s speed.

Code:

@echo off del /q/f/s %TEMP%\* rd /s /q %TEMP% echo Temporary files deleted! pause

How to Save:

  1. Open Notepad

  2. Paste the code above

  3. Click File → Save As

  4. Name it: CleanTemp.bat

  5. Select All Files in “Save as type”


2. WiFi Password Viewer 

Want to see the password of a saved WiFi on your PC? This batch file shows it.

Code:

@echo off netsh wlan show profile name="WiFi-Name" key=clear pause

Note: Replace "WiFi-Name" with your actual WiFi name.

Save as: WifiPassword.bat


3. Auto Backup Script 

This will copy all your important files into a backup folder with just one click.

Code:

@echo off xcopy "C:\Important" "D:\Backup" /s /i /y echo Backup completed! pause

Save as: BackupFiles.bat


4. Network Info Viewer 

This shows all your network information like IP, DNS, and Gateway.

Code:

@echo off ipconfig /all pause

Save as: NetworkInfo.bat


5. Folder Locker 

Create a folder that you can lock and unlock with a password.

Code:

@echo off title Folder Locker if EXIST Private goto UNLOCK if NOT EXIST Private goto MDLOCKER :CONFIRM echo Are you sure to lock this folder? (Y/N) set/p "cho=>" if %cho%==Y goto LOCK if %cho%==N goto END :LOCK ren Private "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" echo Folder locked! goto End :UNLOCK echo Enter password to unlock: set/p "pass=>" if NOT %pass%==1234 goto FAIL attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private echo Folder unlocked! goto End :FAIL echo Wrong password! goto End :MDLOCKER md Private echo Private folder created! goto End :End pause

Note: Change the password (1234) to your own.

Save as: FolderLocker.bat


6. Auto Shutdown Timer ⏳

This shuts down your computer after a set time.

Code:

@echo off shutdown -s -t 3600

Note: Here, 3600 = 1 hour (in seconds).

Save as: ShutdownTimer.bat


7. Restart Internet Adapter 

Sometimes your internet gets slow. Use this to refresh the connection.

Code:

@echo off ipconfig /release ipconfig /renew pause

Save as: RestartInternet.bat

8. Open Multiple Programs at Once 

Want to start your favorite apps with one click? Use this.

Code:

@echo off start chrome.exe start notepad.exe start calc.exe

Note: Replace apps with your own.

Save as: OpenApps.bat


9. Internet Connection Test 

Quickly check if your internet is working or not.

Code:

@echo off ping google.com pause

Save as: InternetCheck.bat


10. Auto Folder Creator (With Date)

This creates a new folder every day with today’s date.

Code:

@echo off set folder=%date:~10,4%-%date:~4,2%-%date:~7,2% md %folder% echo Folder %folder% created! pause

Save as: AutoFolder.bat


🎁 Direct Download Link

If you don’t want to copy-paste all these codes..
You can directly download all batch files ready-to-use from this link:

👉 Download All Batch Files Here