Wednesday, July 22, 2009

Search and Log using SQL

Good evening. The following is an SQL-based version of the Search and Log script.

Here the search is done with the '.Global' parameter turned to false, and so the SQL also takes care of finding the number of instances per file. The logging starts after the search is done, and non-matching folders aren't listed.

SQL usage details: The script creates a temporary table called 'search_log'. My default database is the Northwind sample database, and the connection string is suited to windows authentication mode.

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.

Saturday, July 4, 2009

Convert Footnotes to Regular Text [Word VBScript]

The next script for Word converts all footnotes and their references to regular text. The footnotes are inserted at the end of the document.

Find, Replace and Comment [Word VBScript]

Hi there. I wrote a Find and Replace script for Word, which also adds a Comment for each replacement. Note: It works only on the 'body' of the text, since comments are not available on footnotes / endnotes.