summaryrefslogtreecommitdiff
path: root/winscripts/bulk_rename_by_date_created.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'winscripts/bulk_rename_by_date_created.ps1')
-rw-r--r--winscripts/bulk_rename_by_date_created.ps14
1 files changed, 4 insertions, 0 deletions
diff --git a/winscripts/bulk_rename_by_date_created.ps1 b/winscripts/bulk_rename_by_date_created.ps1
new file mode 100644
index 0000000..0f5ff3b
--- /dev/null
+++ b/winscripts/bulk_rename_by_date_created.ps1
@@ -0,0 +1,4 @@
+$count = 1
+Get-ChildItem -Path 'C:\Users\Jay Jones\Desktop\Screenshots\phase1\*' -Include *.jpg,*.png -File |
+Sort-Object CreationTime |
+Rename-Item -NewName { 'ngimg-{0:D4}{1}' -f $script:count++, $_.Extension }