Created
April 23, 2020 13:10
-
-
Save dylanlangston/6e517d6e9db01bed84d43992bbfc3c83 to your computer and use it in GitHub Desktop.
Powershell script to check if tifs in folder are multipage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Folder = Read-Host -Prompt 'Input folder to check for Tifs: ' | |
[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | Out-Null | |
Get-ChildItem $Folder -Filter *.tif | | |
Foreach-Object { | |
$a = [System.Drawing.Bitmap]::FromFile( $_.FullName ) | |
if ($a.GetFrameCount( [System.Drawing.Imaging.FrameDimension]::Page ) -gt 1 ) | |
{ "`"" + $_.FullName + "`" Tiff is multi pages" } | |
else | |
{ "`"" + $_.FullName + "`" Tiff is single page" } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment