mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-08 09:04:18 +01:00
Improve copy-photos-sorted.ps1
This commit is contained in:
parent
eebb711087
commit
f3f8024a6f
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user