diff --git a/Changelog.md b/Changelog.md index 7f75cc0..d967c0e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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. diff --git a/src/Invoke-MoveFilesIntoDateDirectories.ps1 b/src/Invoke-MoveFilesIntoDateDirectories.ps1 index df7f8fc..668efdb 100644 --- a/src/Invoke-MoveFilesIntoDateDirectories.ps1 +++ b/src/Invoke-MoveFilesIntoDateDirectories.ps1 @@ -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 } diff --git a/src/MoveFilesIntoDateDirectories.ps1 b/src/MoveFilesIntoDateDirectories.ps1 index 02ec8cd..7b12820 100644 --- a/src/MoveFilesIntoDateDirectories.ps1 +++ b/src/MoveFilesIntoDateDirectories.ps1 @@ -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 } }