Page 1 of 1

Changing Created Date of folders to date mentioned within

PostPosted: Sat Jun 29, 2019 11:21 pm
by ReyKenobi
I have a bunch of folders in the format:
ABC - YYYY-MM-DD - XYZ

The YYYY-MM-DD is a date which is part of the folder name.

I want to change the Created Date attribute of the folders to their respective dates mentioned in the folder name. Is it possible and how do I go about doing this? Thanks!

Re: Changing Created Date of folders to date mentioned within

PostPosted: Sun Jun 30, 2019 4:02 pm
by therube
I don't know that BRU will do that.

If the files within the directory are dated the same as you want the created date of their parent directory to be, then see what FolderTimeUpdate will do.

Re: Changing Created Date of folders to date mentioned within

PostPosted: Fri Jul 12, 2019 7:10 pm
by dude
You can in PowerShell:

Warning: Not tested!!

- create FolderList.txt containing all folders that need to change the creation date
(foldernames without surrounding "")
- Create "ChangeDate.ps1" in that same folder. Content:


Code: Select all
gc .\FolderList.txt | gi | % {
   $_.Name -match '\d\d\d\d-\d\d-\d\d'
   $_.CreationTime = $Matches[0]
   echo $_.FullName $_.CreationTime
}


- Run .\ChangeDate.ps1
- If you don't know how to run .ps1 files ( = PowerShell script), google it.
- Let me know if this works.