#1 : 02/04-22 12:36 Steve A
Posts: 1
|
Hi... I'm an old computer fart, going back to TI99's, Comodores, RS80, IBM PC 8088's, etc... Did my share of Basic programming 20+ years ago... I cannot GET MY HEAD around REGULAR expressions... I'm used to IF A then X else Z... (That's a more REGULAR expression than the gobblygook they are callin' REGULAR!)
Okay, I have a couple swimming pools worth of digital images, scanned, cameras, phones, etc... the phones have the dates, and then I've added the dates to the from of some... It's awesome to use this great software to add the date, camera model, and other exif info, by the batch! But, since, Like an idiot, I've gone thru different photos (randomly on a whim) and added dates (before finding AREN).... So, I Simply want this: (THE FORMULA, script, Regex, or is there a section of the numerous settings I've overlooked for this?) I have the exif info, etc. just need the IF A then X else Y portion! IF Filename DOESN'T CONTAIN DATE YET then A (which is typically date, camera model, plus info about the images that I manually add or pull from folders, etc)... IF Filename contains DATE (Year is good nuff) and it'd be the first 4 chars, as in 2005, or 2013 then B, which would be do everything else I specified, EXCEPT THE DATE. Oh Shucks, would it be too hard to add a separate formula for if there's also a CAMERA MODEL??? (If So, I'll work around that... the Date is the biggie) Much Thanks in Advance, Renamers! Stuck in KC |
#2 : 02/04-22 21:52 David Lee
Posts: 1125
|
I don't understand your problem - just use a Script method then you have access to your favourite "IF" statement in JavaScript!
By the way, Regular Expressions were first introduced in 1951 and so pre-date BASIC by 13 years! They are a very powerful tool for pattern matching and are implemented in many computer languages and apps. They are NOT an alternative to the statements to which you are referring - although you can implement simple conditionals using the "|" metacharacter. The simple introduction to Regex in the ARen UserGuide is a very good place to start - in fact I too was totally bemused by Regex (and JavaScript!) before I started to use Advanced Renamer but soon became adept at using both. |