Creation and Modified Dates together

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

Creation and Modified Dates together

Postby mel_ » Thu May 01, 2014 9:58 am

How can I rename a file to include both file creation and modified dates.
Files are not photos by the way so no EXIF.

I have a good regex that I've been able to add either the creation or modified dates to the suffix of the file but not both dates at the same time.

I need file to be in this order :
Code: Select all
baseball_2014-05-01_1520_1526.mov


creation time followed modified time in 24 hour format.

I know I could do two passes. One first for creation date and second for modified date but in my case that won't work because files change modification date after files go through first pass. So I need to do the modification date first but if I do a second pass I would end up with reverse order of creation and modified times if I use suffix as where to put the creation date. So I would end up with this

Code: Select all
baseball_2014-05-01_1526_1520.mov


In short, what can I do to end with the first sample order I gave without doing two passes? I'm stumped. Please help
mel_
 
Posts: 4
Joined: Thu May 01, 2014 9:36 am

Only BRC adds CreateDate & ModDate in 1run

Postby truth » Thu May 01, 2014 4:42 pm

BRU's 1Regex must complete processing before 8AutoDate begins,
so it cant affect anything input by 8AutoDate (on the same run).

Also, 8AutoDate can only extract 1-DateType per run, so BRU cant handle the 1-run requirement.

I'd use BRC for this:
brc32 /pattern:*.mov /nofolders /AppendDate:C:S:_::10:%Y-%m-%d_%H%M /AppendDate:M:S:_::10:%H%M
It renames all .mov's as Filename_CreateDate_ModDate in the below format:
FileName_4DigitYr-Month-Day_HourMin_HourMin
truth
 
Posts: 221
Joined: Tue Jun 25, 2013 3:39 am
Location: Earth, OrionArm, MilkyWay

Re: Creation and Modified Dates together

Postby mel_ » Thu May 01, 2014 8:27 pm

Thank you for helping out truth

Could you please clarify a few things?
1. 8AutoDate I know what that is
2. /pattern is this regex?
3. _::10: what is that?
4. is that entire line one run?
mel_
 
Posts: 4
Joined: Thu May 01, 2014 9:36 am

Append CreateDate and ModDate in 1run with BRC

Postby truth » Fri May 02, 2014 10:27 am

BRC is the command-line version of BRU
/Pattern:*.mov matches all .mov files for renaming

/AppendDate:C:S:_::10:%Y-%m-%d_%H%M
C=CreateDate
S=Suffix
_=OrigNameSeparator
10=spec's a custom-date-format to follow: Year-month-day_HourMinute

/AppendDate:M:S:_::10:%H%M
Same as above, but M for ModDate, with a custom-date-format of HourMinute

Yes, its 1 run..
Each /AppendDate processes in the order spec'd from the commandline.
All variables are held in RAM until a final NewName is determined.

You can also specify diff /regexp's for the same run for tremendous flexibility.
The posted brc32 command only gives a preview of NewNames on the commandline.
Nothing ever gets renamed unless you add /execute to the command.

You can always send the preview to a text-file before using /execute:
brc32 /pattern:*.mov /nofolders /AppendDate:C:S:_::10:%Y-%m-%d_%H%M /AppendDate:M:S:_::10:%H%M > preview.txt
truth
 
Posts: 221
Joined: Tue Jun 25, 2013 3:39 am
Location: Earth, OrionArm, MilkyWay

Re: Creation and Modified Dates together

Postby mel_ » Sun May 04, 2014 12:34 am

Oh wow, this is awesome! I just wanted to give thanks right away. I'll give this a try as soon as I get back home. Thank you very much
mel_
 
Posts: 4
Joined: Thu May 01, 2014 9:36 am


Return to BRU Support