It’s a Girl!!!

So, the offi­cial word is in. I’m kick­ing myself for not writ­ing down the ultra­sound tech­ni­cian’s name. If she is wrong, she owes me some mon­ey for the suf­fer­ing I have and will have to endure. After the appoint­ment, I came home from work and found pink clothes all over the house. I thought, “It’s start­ing!”

Truth­ful­ly though, I could­n’t be hap­pi­er. Every day, I think about what she is going to be like. I already know she will be stub­born. And, I have to admit that, she will prob­a­bly be dad­dy’s lit­tle girl. What can I say, I’m going to be a dad. What girl isn’t dad­dy’s lit­tle girl?

Here is a shot: baby0002.png.

Besides that, noth­ing much is new. Just enjoy­ing the fact that I am going to be a dad!

Oh yeah, her name… Angel­i­ca June. My lit­tle angle… I can already hear her say­ing, “But why dad­dy, I’m your lit­tle angle.”

VBScript: Delete Files Older Than One Hour

So, I am con­stant­ly look­ing for ways of automat­ing tasks. Too many admins do not take advan­tage of script­ing and sched­uled tasks/cron. Just this last week, I was imple­ment­ing a new print serv­er. Besides just build­ing up the new serv­er, I want­ed to actu­al­ly offer the users some­thing new and use­ful.

I’ve been want­i­ng to set­up a net­work pdf print­er for quite some time. I have played around with set­ting up a net­work PDF print­er using cups. How­ev­er, we seem to be so MS cen­tric these days that I decid­ed to use PDFCre­ator’s print serv­er. It was real­ly a piece of cake. Just install the serv­er por­tion, set­up the ser­vice, cre­ate a share and watch the PDF’s spool.

I quick­ly found that the fold­er where PDF’s were writ­ten to, was quick­ly fill­ing with PDF’s as users were not remov­ing them. So, the solu­tion was to write a lit­tle vbscript to purge any files old­er than an hour. There were two things I want­ed:

  1. I have a file named “!FILES ARE PURGED AFTER ONE HOUR!”. I did not want this file removed. It serves as a warn­ing for uses.
  2. I did not want to purge the fold­er every hour. I want­ed to remove any files that were one hour old or greater. That way, if a user cre­ates a PDF at 2:59pm, the 3:00pm run won’t delete it. It will be delet­ed on or after 3:59pm.

Here is the script I came up with:

strFolder = "C:Folder"
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(strFolder)
Set objFSO = CreateObject("Scripting.FileSystemObject")

For Each strFileName in objFolder.Items
    If len(objFSO.GetExtensionName(strFileName)) > 0 Then
        Set objFile = objFSO.GetFile(strFolder & strFileName.Name)
        If DateDiff("N",objFile.DateLastModified,Now()) > 59 Then
            objFSO.DeleteFile(strFolder & strFileName.Name),True
        End If
    End If

The great thing about this is that you get a free net­work PDF print­er that can be left alone. Your boss thinks you are a genius and there is no sweat on your brow.