This software can be downloaded at
http://www.highfiber.com/~raster/freeware.htm
Simply put, the biggest feature of this software is that it can perform various operations on the found files.
The function is too powerful. For details, please refer to the software's help.
As long as you copy locate.com to the WINDOWS\SYSTEM32 directory, you can call it freely in batch processing.
For finding EXE files on the hard disk and then deleting them, you can use it like this (taking drive C as an example):
locate c: *.exe /n /np /k /y
or locate c:\*.exe /n /np /k /y
Parameter explanation: /n: Display all found files with the full path
/np: Do not pause by page when displaying, that is, display continuously
/k: Delete the found files
/y: Delete directly without asking for YES
(Note: locate defaults to searching from the root directory and automatically searches all subdirectories and all partitions. That is to say, locate *.exe will search for EXE files in all partitions and all directories. Also, the parameter is case-insensitive.)
If you want to find files on several partitions:
locate c: d: f: *.exe /n /np /k /y
If you don't want to search subdirectories, add the /nr parameter.
If you only want to search the hard disk and not the CD-ROM, floppy disk, USB disk, add the parameter /r.
For example: locate c:\windows\*.exe /nr only searches the c:\windows directory.
If you want to stop searching when a specific file is found, you can use the parameter /f:n, where n is a number, indicating how many to search.
For example: locate c:\windows\explorer.exe /f:2 searches for explorer.exe in c:\windows and its subdirectories, and stops when 2 are found.
In short, this software is too powerful. The following attaches a batch processing for reference.
*****************************************************
Function:
- Rename EXE, DLL, and SYS files under the root directory where the Windows system is located, "windows", "program files", "Documents and Settings" and their subdirectories according to the age of the specified files.
Enter rn without parameters to display the usage of this processing.
*****************************************************
@echo off
if "%1"=="" goto help0
::
locate c: d: e: f: g: \*.exe /R /NR /b1"rename" /d:t-%1,t > rnexe.bat
locate c: d: e: f: g: \*.dll /R /NR /b1"rename" /d:t-%1,t > rndll.bat
locate c: d: e: f: g: \*.sys /R /NR /b1"rename" /d:t-%1,t > rnsys.bat
::
locate c: d: e: f: g: \winnt\*.exe /R /b1"rename" /d:t-%1,t >> rnexe.bat
locate c: d: e: f: g: \winnt\*.dll /R /b1"rename" /d:t-%1,t >> rndll.bat
locate c: d: e: f: g: \winnt\*.sys /R /b1"rename" /d:t-%1,t >> rnsys.bat
::
locate c: d: e: f: g: \windows\*.exe /R /b1"rename" /d:t-%1,t >> rnexe.bat
locate c: d: e: f: g: \windows\*.dll /R /b1"rename" /d:t-%1,t >> rndll.bat
locate c: d: e: f: g: \windows\*.sys /R /b1"rename" /d:t-%1,t >> rnsys.bat
::
locate c: d: e: f: g: \progra~1\*.exe /R /b1"rename" /d:t-%1,t >> rnexe.bat
locate c: d: e: f: g: \progra~1\*.dll /R /b1"rename" /d:t-%1,t >> rndll.bat
::
locate c: d: e: f: g: \docume~1\*.exe /R /b1"rename" /d:t-%1,t >> rnexe.bat
locate c: d: e: f: g: \docume~1\*.dll /R /b1"rename" /d:t-%1,t >> rndll.bat
::
call rnexe.bat *.eee
call rndll.bat *.ddd
call rnsys.bat *.sss
echo ... >log.txt
echo rnexe.bat >>log.txt
echo rndll.bat >>log.txt
echo rnsys.bat >>log.txt
goto end0
::
:help0
cls
@echo ***********************************************************************
@echo Function description
@echo - Rename EXE, DLL, and SYS files under the root directory where the Windows system is located, "windows", "program files", "Documents and Settings" and their subdirectories according to the age of the specified files.
@echo ***********************************************************************
@echo Usage
@echo - rn The age of the file relative to the current date
@echo Examples are as follows
@echo rn 0: Only rename EXE, DLL, SYS and other files generated today
@echo rn 1: Rename EXE, DLL, SYS and other files generated today and yesterday
:end0
@echo ***********************************************************************
@echo Please refer to log.txt for the changes of files.
@echo.
:end0