Author Topic: [Help!] How to rename files already renamed?  (Read 1299 times)

vpv

  • New Members
  • *
  • Posts: 32
[Help!] How to rename files already renamed?
« on: August 07, 2017, 05:25:32 PM »
Sorry for silly Subject...
My challenge is following.

When I import photos I rename them to YYYYMMDD-12345.NEF (20170806-36506.NEF)

YYYY, MM, DD - information from the file - when the photo was captured
12345 - digits from original name (from camera) - _DSC36506
I prefer to use the count information from EXIT, but don't know how to insert it from Nikon D810 :(

For the weddings (and some events) I use modified names - adding HH, MM and SS to the name to make it easier to sort by capture time
YYYYMMDD--HHMMSS-12345.NEF (20170802-122048-33319.NEF)
I use more, that one camera and sync time on them before the shoot.

The issue, that (by mistake) I renamed photos from the wedding using the main name convention - without HH:MM:SS...

How to rename the file from YYYYMMDD-12345.NEF to YYYYMMDD--HHMMSS-12345.NEF
I need to keep "12345" from original files?

Thank you!

vpv

  • New Members
  • *
  • Posts: 32
Re: [Help!] How to rename files already renamed?
« Reply #1 on: August 07, 2017, 05:34:54 PM »
I think I have a solution: After YYYYMMDD-HHMMSS- add {File.Name|substr:9}

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 23039
Re: [Help!] How to rename files already renamed?
« Reply #2 on: August 07, 2017, 05:38:37 PM »
Problem solved?

vpv

  • New Members
  • *
  • Posts: 32
Re: [Help!] How to rename files already renamed?
« Reply #3 on: August 07, 2017, 05:48:30 PM »
Almost  :)
Thank you for so quick respond!

If I insert {File.MD.Nikon::Main\167\ShutterCount\0} to get count information (*-12345.NEF)
I have something like "20170806-234334-36,202.NEF"

How can I have digits only? Without comma in ShutterCount? Instead of "36,202" - "36202"?

Thank you!

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 23039
Re: [Help!] How to rename files already renamed?
« Reply #4 on: August 07, 2017, 06:36:15 PM »
ShutterCount is a numerical variable and IMatch Variables output numbers using your local number format, including thousands grouping and decimal point/comma.
Use

{File.MD.Nikon::Main\167\ShutterCount\0|cast:int}

to output the number without formatting.

Tip: You can try such things out easily in the VarToy app.

vpv

  • New Members
  • *
  • Posts: 32
Re: [Help!] How to rename files already renamed?
« Reply #5 on: August 10, 2017, 01:32:29 AM »
Thank you, Mario!
That's exactly what I needed :o)