|
Macro-izing the search
When trying to write an update tool, I needed something like the examples you all wrote, except that I wanted to have a function called with the directory or file that was found.
For instance, my update tool works over a Novell network share (a mapped drive on our network) and scans the deploy dir (like your find functions). The difference was that when I found a file, I compared it to a file in the installation directory and overwrote if the mod-time was newer, also if it was a dll or ocx register it if the dll version is newer. For directories, did the same.
The find code should really be macro-ized so that you can run code on the searched files/dirs while searching - this makes the code more generic and more useful. Please don't shoot me for saying that!
UPDATE: SORRY, just read the archive and you have done this... well done.
|