Skip to content

Instantly share code, notes, and snippets.

@itsho
itsho / EncryptFolderWithGnuPG.ps1
Last active November 17, 2021 22:00
Encrypt folder with GnuPG
Write-Host "Encrypt folder with GnuPG."
Write-Host "Itamar 2021-11-17"
$gpgExeLocaiton = "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
$inputFolder = "C:\Temp\origin"
$outputFolder = "C:\temp\output"
$recipientEmail = "[email protected]"
if ([string]::IsNullOrEmpty("$inputFolder") -or -not (Test-Path -Path "$inputFolder" -PathType Container)){
Write-Error "input folder does not exist."
exit 1
@itsho
itsho / AddFilter.vbs
Created August 23, 2023 18:06
MSAccess VBA - Add Filter and FilterOnLoad to TableDef
Public Sub AddFilter(ByVal p_strNameOfRemoteTable As String, ByVal p_strWhereClause As String)
Dim db As Database
Dim td As TableDef
Dim propFilter As Object
Set db = CurrentDb()
Set td = db.TableDefs(p_strNameOfRemoteTable)
With td
' Enforce table to load data with filter (This property is promised to be exists)