Skip to content

Instantly share code, notes, and snippets.

View BenniG123's full-sized avatar

Ben Williams BenniG123

View GitHub Profile
@BenniG123
BenniG123 / tesseract-ocr-folder.ps1
Last active November 14, 2023 14:37
Quick powershell script to grab all images in a folder, run tessaract OCR on all of them, and then pipe all output to out.txt
function Get-DirectoryName($initialDirectory)
{
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
$openFolderDialog = New-Object System.Windows.Forms.FolderBrowserDialog
$openFolderDialog.ShowDialog() | Out-Null
return $openFolderDialog.SelectedPath
}
Write-Output "Select image folder"