INFORMATICS

The Best

Przełącznik języka

This Site

CMS

Hardware

Uncategorised

useful sites

Databases

Emulators

Powershell

Storage Array

DNS

Antivirus program

Licznik

1.png8.png0.png6.png3.png5.png0.png
Today829
Yesterday1019
This week3161
This month23312
Total1806350

Visitor Info

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

Who Is Online

3
Online

Tuesday, 26 May 2020 18:51

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