Page 1 of 1

Need to remove trailing period from files -not extension "."

PostPosted: Wed Aug 09, 2017 12:03 am
by blades
I have many files named with an extra PERIOD at the end, before the file extension. They are mixed in with other files, so I don't want to select them separately. If I was to select them separately, and the rule applied to every file, I could use the remove last or trim, etc.

Example: filename..txt ==> filename.txt.

When I select an entire folder, I can't figure out the combination to remove last period "if exists", not including the extension suffix.

Any help would be appreciated.

Thanks

Re: Need to remove trailing period from files -not extension "."

PostPosted: Wed Aug 09, 2017 12:05 pm
by Emerkamp
Options>> Ignore>> File extension

Repl: (3)
Replace:
..
With
.

Re: Need to remove trailing period from files -not extension "."

PostPosted: Thu Aug 10, 2017 5:29 pm
by blades
Thanks for the follow-up. That suggestion I've done, but I only have 1 remaining "." at the end of the file (excluding the ".txt"). I want to remove the last period, but not all the periods in the filename. I use periods as spaces, because I don't like how "_" looks in a filename.

So I need to make:

test.filename.number.1..txt equal test.filename.number.1.txt

Without having to choose every file with the trailing period (which I could use the remove last n function) in the folder.

Thanks!

Re: Need to remove trailing period from files -not extension "."

PostPosted: Thu Aug 10, 2017 8:49 pm
by Emerkamp
Hi,

Did you try it to see.

This should replace any double .. to . and includes the . for file .ext

This will work as long as you only have double .. at the end of the name because of file ext.

If You have double .. in the middle of the names anywhere, we will have to try with Regex. also 3-4 good examples to find a pattern.

Re: Need to remove trailing period from files -not extension "."

PostPosted: Fri Aug 11, 2017 11:36 pm
by blades
Yes, thank you. I did try, because I thought the same way you described it. It seems to ignore the "." that's part of the extension, as if it's not part of the "filename". I'll give it another go, and let you know.

Thanks again!

Re: Need to remove trailing period from files -not extension "."

PostPosted: Sat Aug 12, 2017 3:00 am
by Emerkamp
Hi,

Be sure to tick options as stated above. It works backwards from how you might think.
Tick= includes file ext.

Re: Need to remove trailing period from files -not extension "."

PostPosted: Sun Aug 13, 2017 9:31 pm
by blades
Will do, thanks again for the help!

Re: Need to remove trailing period from files -not extension "."

PostPosted: Fri Nov 24, 2017 4:34 pm
by NealGar
Emerkamp wrote:Hi,

Be sure to tick options as stated above. It works backwards from how you might think.
Tick= includes file ext.


Yep, that makes it a little confusing lol.