mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-14 20:14:00 +01:00
Update copy-photos-sorted.ps1
This commit is contained in:
parent
d645f5940d
commit
bf5aa0a598
@ -36,7 +36,7 @@ function CopyFile { param([string]$SourcePath, [string]$TargetDir, [int]$Date, [
|
||||
}
|
||||
$TargetPath = "$TargetDir/$Year/$MonthDir/$Filename"
|
||||
if (test-path "$TargetPath" -pathType leaf) {
|
||||
"Skipping $Filename: already existing..."
|
||||
"Skipping $($Filename): already existing..."
|
||||
} else {
|
||||
"Copying $Filename to $Year/$MonthDir..."
|
||||
new-item -path "$TargetDir" -name "$Year" -itemType "directory" -force | out-null
|
||||
@ -70,7 +70,7 @@ try {
|
||||
$Array = $Filename.split("_")
|
||||
CopyFile "$File" "$TargetDir" $Array[1] "$Filename"
|
||||
} else {
|
||||
"Skipping $Filename: unknown filename format..."
|
||||
"Skipping $($Filename): unknown filename format..."
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user