I have a folder that I need to have de-crypted.
I have set up a WBT script to automate the process, but it does not support wildcards.
>>>> RunWait('C:\Program Files\GNU\GnuPG\gpg2.exe', "--batch --passphrase XXXXXXX C:\TempDecrypt\NNA2FAIR123.pgp" )
For the life of me, I can't find the code that list all of the *.pgp files in a specific directory, and then one by one loop through each one with the above line decrypting them.
I thought it was a recursive search...serious brain cramp here...
FileItemize can be used for a non recursive search.
DirChange('c:\temp\')
pgpfiles = FileItemize('*.pgp')
For x = 1 to count
filename = ItemExtract(x,pgpfiles,@tab)
; individual file decrypt code goes here
Next
Or if you need a recursive file search use the File and Folder extender:
AddExtender('WWFAF44I.DLL', 0, 'WWFAF64I.DLL')
fsRecurse = 16 ; Look in sub directories
; Open a search handle
fsHandle = fafOpen("c:\Temp\", "*.pgp", fsRecurse)
While 1
sFound = fafFind(fsHandle)
If sFound == "" Then Break
; individual file decrypt code goes here
EndWhile
fafClose(fsHandle)
Exit