truncating expressions

A swapping-ground for Regular Expression syntax

truncating expressions

Postby the_traveler » Mon Mar 11, 2013 4:35 pm

While traveling I used an unfamiliar Linux image downloader which appended the f value of every image to the file extension.
(yes, it was stupid, not to notice. and reasonably stupid to both include this option and hide it on another page)
So I ended up with ~11000 images with suffixes of .NEF + f stop with various numbers of significant digits from 1 to 10
(example Mandalay_dsc650007.NEF5666666)

I need to truncate all these to just the original filename plus the original extension. (Mandalay_dsc650007.NEF)

What complicates this slightly is that there are two kinds of extentions - .NEF and .ARW
I can separate them of course if the truncation requires it.

TIA,

Lew
the_traveler
 
Posts: 1
Joined: Mon Mar 11, 2013 4:25 pm

Re: truncating expressions

Postby Stefan » Mon Mar 11, 2013 8:48 pm

FROM:
file name.NEF1234567
file name.ARW1234567
TO:
file name.NEF
file name.ARW

USE:
just an dirty trick... just use a new fixed extension.
For your case having one or two ext only, this is the easiest.

Step1:
Selection(12)[ *.NEF* ]
Extension(11) Fixed:[ NEF ]
Preview
Rename

Step2:
Selection(12)[ *.ARW* ]
Extension(11) Fixed:[ ARW ]
Preview
Rename



Isn't it?

In case of many different extension i would use
Options > Ignore... > File Extensions
Remove(5) Last [ 7 ]

or smtg like that.
-
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU

Re: truncating expressions

Postby capal4321 » Wed May 29, 2013 3:37 pm

Steps 1 and 2 works.


but in the case of the many different kind of extensions,
i tried excluding the extensions under folder and then tried function (5) by removing last 12
the untility will only remove the characters before the extension. Somehow whatever that appears after the extension is not recognized at all.
I hope there is a solution .



Thanks,
capal4321
 
Posts: 1
Joined: Wed May 29, 2013 3:09 pm


Return to Regular Expressions


cron