From 762a083f0ad2ea68fe1f97f88dad04acef8bc276 Mon Sep 17 00:00:00 2001 From: deadlydog Date: Wed, 19 Oct 2022 11:05:14 -0600 Subject: [PATCH 1/4] feat: Support brackets in filenames --- Changelog.md | 5 +++++ src/MoveFilesIntoDateDirectories.ps1 | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 7f75cc0..68eab08 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,10 @@ # 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). ## v1.0.0 - November 1, 2020 Initial script. 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 } } From b6ad5339d034212475b8f5769e5a3ad4a35619bb Mon Sep 17 00:00:00 2001 From: deadlydog Date: Wed, 19 Oct 2022 11:06:50 -0600 Subject: [PATCH 2/4] feat: Use more self-explanatory values in Invoke script --- Changelog.md | 2 ++ src/Invoke-MoveFilesIntoDateDirectories.ps1 | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index 68eab08..71047b0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -5,6 +5,8 @@ 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..d8c6652 100644 --- a/src/Invoke-MoveFilesIntoDateDirectories.ps1 +++ b/src/Invoke-MoveFilesIntoDateDirectories.ps1 @@ -3,9 +3,9 @@ # Specify the parameters to call the cmdlet with. [hashtable] $scriptParameters = @{ - SourceDirectoryPath = 'C:\Dans\Imported Photos\NotByDateYet' - #SourceDirectoryDepthToSearch = 2 - TargetDirectoryPath = 'C:\Dans\Imported Photos' + 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 } From 4593fd8787cd76054f83e9c0ebf943bcb0d17827 Mon Sep 17 00:00:00 2001 From: deadlydog Date: Wed, 19 Oct 2022 11:07:24 -0600 Subject: [PATCH 3/4] grammar --- src/Invoke-MoveFilesIntoDateDirectories.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Invoke-MoveFilesIntoDateDirectories.ps1 b/src/Invoke-MoveFilesIntoDateDirectories.ps1 index d8c6652..668efdb 100644 --- a/src/Invoke-MoveFilesIntoDateDirectories.ps1 +++ b/src/Invoke-MoveFilesIntoDateDirectories.ps1 @@ -6,7 +6,7 @@ SourceDirectoryPath = 'C:\SourceDirectory\WithFilesToMove' #SourceDirectoryDepthToSearch = 2 # Default is to search all subdirectories. TargetDirectoryPath = 'C:\TargetDirectory\ToMoveFilesInto' - TargetDirectoriesDateScope = 'Day' # Hour, Day, Month, or Year + TargetDirectoriesDateScope = 'Day' # Hour, Day, Month, or Year. Force = $false } From 9789a45d1f99992d4ad46bb1313e3ba0b25b02c7 Mon Sep 17 00:00:00 2001 From: deadlydog Date: Wed, 19 Oct 2022 11:11:42 -0600 Subject: [PATCH 4/4] grammar --- Changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 71047b0..d967c0e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,7 +2,7 @@ ## v1.1.0 - October 19, 2022 -features: +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.