Skip to content

Commit

Permalink
Merge pull request #3 from deadlydog/UseLiteralPathToSupportMoreFilen…
Browse files Browse the repository at this point in the history
…ameCharacters
  • Loading branch information
deadlydog authored Oct 19, 2022
2 parents e8bf96c + 9789a45 commit f02b5ad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## v1.1.0 - October 19, 2022

Features:

- Add support for more special characters in filenames, such as brackets, to address [issue #2](https://github.com/deadlydog/MoveFilesIntoDateDirectories/issues/2).
- Update Invoke script values to be more descriptive and self-explanatory.

## v1.0.0 - November 1, 2020

Initial script.
8 changes: 4 additions & 4 deletions src/Invoke-MoveFilesIntoDateDirectories.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

# Specify the parameters to call the cmdlet with.
[hashtable] $scriptParameters = @{
SourceDirectoryPath = 'C:\Dans\Imported Photos\NotByDateYet'
#SourceDirectoryDepthToSearch = 2
TargetDirectoryPath = 'C:\Dans\Imported Photos'
TargetDirectoriesDateScope = 'Day' # Hour, Day, Month, or Year
SourceDirectoryPath = 'C:\SourceDirectory\WithFilesToMove'
#SourceDirectoryDepthToSearch = 2 # Default is to search all subdirectories.
TargetDirectoryPath = 'C:\TargetDirectory\ToMoveFilesInto'
TargetDirectoriesDateScope = 'Day' # Hour, Day, Month, or Year.
Force = $false
}

Expand Down
2 changes: 1 addition & 1 deletion src/MoveFilesIntoDateDirectories.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Process

[string] $filePath = $file.FullName
Write-Information "Moving file '$filePath' into directory '$dateDirectoryPath'."
Move-Item -Path $filePath -Destination $dateDirectoryPath -Force:$Force
Move-Item -LiteralPath $filePath -Destination $dateDirectoryPath -Force:$Force
}
}

Expand Down

0 comments on commit f02b5ad

Please sign in to comment.