Posts

Showing posts with the label vbscript

More PGP Fun

This process outlined is not unlike what I wrote about in my post here , but involves a bit more logic. The script has to check for files that were posted that morning, but also have a file naming convention of the previous day. I've also got about 200 EMR postscript files to sort by date of service. First, the source PGP/tar files must be checked for existence, and must be a pair with the proper date formatted file name. @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION :: ////////////////////////////////////////////// :: :: Set path variables for key access, passphrase, :: and source our key files. SET PGPPATH=C:\PGP_keys\ SET PGPPASS=MYPGPPASS :: The "KEY" to a successful import of our keys is running these coMMands as the user :: that will be running this script. :: pgp +batchmode -ka %PGPPATH%SECRING.SKR :: pgp +batchmode -ka %PGPPATH%PUBRING.PKR :: pgp -ke 0xEC671710 > %_LOGFILE% ECHO -- START %DATE% - %TIME% -- >> %_LOGFILE% ECHO -----------------------...

Using Batch to decrypt PGP and more

Image
This script was recently written to automatically process files on our FTP server. They come in daily, in pairs, and dated with todays date, e.g. XXERUP0912.dat.pgp. The script checks for existence, ensures a pair is found, makes sure they are the right and same date, then decrypts them and calls an external program I wrote to inject them into a SQL database for querying via ASP, which I also wrote. If any of the steps fail, it gets logged, and an email notification is sent to a number of folks. I had a bit of an issue with expansion, but found the error of my ways in short order... @ECHO On SETLOCAL ENABLEDELAYEDEXPANSION :: ////////////////////////////////////////////// :: :: Set path variables for key access, passphrase, :: and source our key files. SET PGPPATH=C:\PGP_Keys\ SET PGPPASS=MYPGPPASS :: The "KEY" to a successful import of our keys is running these commands as the user :: that will be running this script. :: pgp +batchmode -ka %PGPPATH%SE...

Scripting...

I've been putting together a lot of automation in the way of login/logout scripts, and documenting on our company Intranet that I put together [FlexWiki.com]. Here are the scripts. UPLOAD.BAT Location: F:\DATA\DOWNLOAD\OUTPUT. Explanation: Used by persons scrubbing data to upload to Misys server and change permissions for interfacing purposes. Without this script, the files would not be set to the correct permissions, and a root user would have to manually change those at the AIX CLI. @ECHO OFF :: Create the temporary script file >script.ftp ECHO ftputil >>script.ftp ECHO mypassword >>script.ftp ECHO ascii >>script.ftp ECHO prompt n >>script.ftp ECHO cd /src/APPS/HT/bin >>script.ftp ECHO mput *.TXT >>script.ftp ECHO debug . :: Create the file list dir /b *.TXT > FILES.LST FOR /F "tokens=1" %%I IN (FILES.LST) DO >>script.ftp ECHO quote SITE chmod 666 %%I :: Exit FTP >>script.ftp ECHO quit :: Use the tempo...