Improve copy-photos-sorted.ps1

This commit is contained in:
Markus Fleschutz 2021-07-15 17:58:15 +02:00
parent eebb711087
commit f3f8024a6f

View File

@ -48,12 +48,20 @@ try {
$Array = $Filename.split("_")
CopyFile $File $Filename $Array[1] $TargetDirTree
$Count++
} elseif ("$Filename" -like "IMG-*-*.jpg") {
$Array = $Filename.split("-")
CopyFile $File $Filename $Array[1] $TargetDirTree
$Count++
} elseif ("$Filename" -like "PANO_*_*.jpg") {
$Array = $Filename.split("_")
CopyFile $Filen $Filename $Array[1] $TargetDirTree
$Count++
} elseif ("$Filename" -like "PANO-*-*.jpg") {
$Array = $Filename.split("-")
CopyFile $Filen $Filename $Array[1] $TargetDirTree
$Count++
} else {
"Unknown filename format: $Filename"
"Can't extract year and month from: $Filename"
}
}