Remove dash from between photo date taken

I am looking to change any file names in my photo folder (whether they are "-289" or anything else). I have applied the date taken {createddate} to the new filename. That works. I have used (.*) as the old name. I want the format to follow datetaken (no dahses or spaces) and then an underscore and then time in hour and without space AM/PM.

Here's a couple of examples:

Old: -289 New: 20200820_6PM
Old 2020-08-20 New 20200820_6PM

What I am facing is:

  1. I want to remove all elements of the filename from old and start fresh.
  2. I want to rename all photos as date taken then time taken in this format: 20200420_5PM

I have the regex for the datetaken and time. But I can't get the dashes out of the date.

Currently it is showing as "2020-04-20_6PM"

How do I remove the dashes from the date taken?

I have tried regex plus find and replace but cannot really understand how it is used or any examples or more in-depth tutorials that would help me in my situation. So sorry if I missed something. I have tried retrofitting some add spaces presets, etc but I can't figure it out.

I am using latest version of DOpus (v.12.20.03 BETA x64)

Any help would be greatly appreciated. Again, sorry if this is a stupid question.

No need to use regex; if you want to throw away the whole original filename it's easier to use the standard wildcard mode:

Old name: *
New name: {datetaken|D#yyyyMMdd_T#htt}

The date and time formatting codes are described here.

From more photos taken on 2020-04-06 at 6PM i think
You can rename only one photo as 20200406_6PM

Turning on the Automatically rename if new filename exists option would deal with that; alternatively you could add the minutes/seconds into the new name as well.

Isn't there a special place in hell for people who use single digits and 12-hour-clock? :wink:

Maybe they'd like the filenames like this:


... to show up BEFORE ...


... in a natural sort order.

I don't know why, but maybe that's what they want?

Meanwhile, you and I will use


and will happily see everything in the correct order (or reverse order, when desired).

1 Like

Hi DesertDwarf. Although there may be a special hell in those of us who use one digit times, your observation is correct. :slight_smile:
Thanks, all. Much appreciated. Works like a charm.

1 Like

Okay, an addendum to this one. I have now got the rename RegEx I want for above (and changed somewhat to reflect some advice from Ixp... :slight_smile:)

Is there a way that I can append the location of the photo (when present)? i would like this so I can search photos by location name. I could do it by long. and lat. I guess, but was wondering if better way. Unfortunately I'm not too familiar with scripts... Please let me know. Thanks.

e.g. {datetaken| tt}-New York or some location like that

Do you mean you want the location to be determined automatically, or do you just want to type in a name that's added to the file names?

I want the geolocation to automatically be appended to the naming convention I got from above (if available / present)

Maybe there's a web service which can do via scripting that but it's beyond what anything built in to Windows or Opus.

Geosetter can look up location info based on GPS coordinates and store it as metadata and use it for renaming.

Thanks, Ixp. I'll try that and see if that works. Appreciate the quick reply.