Awwwwww, crap!

After all the work I did on these batch files that decrypt PGP files, and un-tar the contents, I've found an error, and a pretty major *duh* one at that.

Seems my logic was way off when it came to doing some date checking. Since the files I check have a naming convention that uses the previous days date, I was simply subtracting one from %TODAY%. Seems ok, right?

No.

This is the *duh* part. I simply subtracted 1. From 1001, that makes 1000. That's not a day, when you are using MMDD as the convention. What I was looking for was 930. NOT the same.

SSSssoooooo, I added a bit I found on Experts Exchange (THANK you..for saving me MUCHO time).

I was also having some issues trapping the ERRORLEVEL. Apparently, since FOR loops in DOS batch scripts are executed as one command, PGP never has a chance to pass it's exit code to my IF check, so this was also modified.

The modded file is here.

Comments

Popular posts from this blog

NPI Search Redundancy

freeFTPD

Using ImageMagick and Tesseract to sort TIFFs on Windows