INFORMATICS

The Best

Przełącznik języka

This Site

CMS

Hardware

Uncategorised

useful sites

Databases

Emulators

Powershell

Storage Array

DNS

Antivirus program

Licznik

2.png0.png2.png7.png9.png0.png9.png
Today218
Yesterday790
This week2914
This month1794
Total2027909

Visitor Info

  • IP: 3.232.129.123
  • Browser: Unknown
  • Browser Version:
  • Operating System: Unknown

Who Is Online

10
Online

Wednesday, 03 March 2021 09:11

Batch to Delete File Automatically

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Batch to delete file based on extension .txt

echo Batch to delete file

del "D:\temp\*.txt" /s /f /q

echo Done

Save file to del.bat

/s parameter will delete all files contained in the directory subfolders. If you do not want to delete files from subfolders, remove /s parameter.

/f parameter ignores any read-only setting.

/q “quiet mode,” meaning you won’t be prompted Yes/No

Batch to delete all files

echo Batch to delete file

del "D:\temp\*.*" /s /f /q

echo Done

Save file to del.bat

 

 

Search