Posts

Showing posts from April 17, 2005

Deleting files that are greater than 30 days old

Image
In looking for a way to delete files that are older than 30 days, I came across ForFiles.exe:


ForFiles is useful for a couple of reasons:
1. It replaces the FOR command in the command shell, which is extremely powerful and useful, but a bit of a pain.
2. It allows you to use relative time (in days) to select the files that you want to act upon

Because links often break, I've included the content here. This is a microsoft TechNet article.


Link to article:
ForfilesUpdated: January 21, 2005Related Links•Command-line reference A-ZCommand shell overviewDirForfilesSelects files in a folder or tree for batch processing.Syntaxforfiles [/p Path] [/m SearchMask] [/s] [/c Command] [/d[{+ | -}] [{MM/DD/YYYY | DD}]]Parameters/p PathSpecifies the Path on which you want to start searching. The default folder is the current working directory, which you specify by typing a period (.)./m SearchMaskSearches files according to SearchMask. The default SearchMask is *.*./sInstructs forfiles to search i…

Microsoft Word will not work on a server on which it is not installed

Turns out that Microsoft Word won't work on a server on which it's not installed :)

I support a program that interfaces with the InSystems Calligo Assembly Engine (or assembly server, depending on configuration) through DCOM using the InSystems assembly link toolkit.

We have, over the years, decided to take advantage of every API that the assembly link toolkit affords, and therefore do our printing through a AssemblyLinkDocument.PrintDoc() method.

As it turns out, the .print() method does a very strait-forward automation of MS-Word to accomplish it's printing, and will therefore not work when Word is not isntalled.

This manifest itself by an HResult of 0x80010105 on the call PrintDoc. Some initial googling of the value indicated that this is what you get when you try to invoke a method on an object that has yet to be instantiated.