Saturday, July 18, 2009

Search and Log [VBScript]

Greetings. I wrote a script that Searches for a string in file names and Logs the results in a text file. It has the following neat features:

* Search results refer also to the number of instances the searched string appears in the file name.

* While the process is running, search data is written to a ~.tmp file, and on successful completion the file is renamed to .log.
File names summarize the target of the search, and cannot be overridden.

* If the selected folder for search contains subfolders, the user is prompted to include them in the search. By calling the search sub procedure from itself, the search drills down into deepest subfolders.

* For searches that include subfolders, a short summary of the search results is featured in the end of the log file, including a list of the file types for the matching files, in descending order.

No comments:

Post a Comment