Changing Created Date of folders to date mentioned within

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Changing Created Date of folders to date mentioned within

Postby ReyKenobi » Sat Jun 29, 2019 11:21 pm

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!
ReyKenobi
 
Posts: 1
Joined: Sat Jun 29, 2019 11:14 pm

Re: Changing Created Date of folders to date mentioned within

Postby therube » Sun Jun 30, 2019 4:02 pm

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.
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Changing Created Date of folders to date mentioned within

Postby dude » Fri Jul 12, 2019 7:10 pm

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.
dude
 


Return to BRU Support