Question Locked

search & deleting speficic file type on Windows Startup

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Dear Experts,

May I know how to write a script that can automatically search & delete specific file type on Windows Startup?

Any advice is higly appreciated.

Thanks a lot,

Hop

2 replies

by rob miners

Create a Batch File and place it in the Root Directory of the folders that you want it to search. Be very careful of what you have as the extension and where you place the file. You can have it look for a particular file EG: VIRUS.exe

The batch file below will search the directory and sub directories looking for files with the .mp3 extension deleting them quietly and forcefully.

@echo off
del /s /q /f *.mp3

Keep us informed as to your progress if you require further assistance.

If you think that any of the posts that have been made by all TR Members, have solved or contributed to solving the problem, please Mark them as Helpful so that others may benefit from the outcome. ;) :D

This discussion is closed to new replies.