Search and Replace Question


#1

First of all, thanks to Florian for helping me fix my Excel import/export issue.

My new issue has me stumped. I need to remove all of the periods (.) in the filename without affecting the last period, which creates the extension.

I don't see any way to create this in a single expression replace. I've tried a 2-line replace and get some weird behavior. The program appears to want to add periods to the end of the filename if none is present.

Any suggestions for a more elegant way to handle this?

Thanks,

Jeremy

Catalan.txt (31.1 KB)


#2

Hi

Just use a regular expression with:
Field: _FILENAME
Expression: (.*)(.\w+)
Replace with: $replace($1,., )$2
(all points will be replaced with spaces)

or

Replace with: $replace($1,.,)$2
(all points will be removed)

Note: this uses the new format of the scripting expressions, so use the new development build

nickless


#3

Hey Florian,

How would you change this to all remove periods from '_TAG'

Also, curious if you can also do this to %aritst%\%album%\ of the filename

Thanks,
Billy - one of your many pimps over at winamp.com forums :smiley:


#4

Hello Billy,

Just create a new action Replace for the field _TAG and replace the period by nothing.

No. You can create new folders and subfolders using the converter Tag - Filename but I'd use a File Manager with renaming/replacing options like Total Commander with its Multi-Rename Tool.

Best regards,
~ Florian


#5

whoa, i was making it way to hard... duh :rolleyes:

and i shall check out Total Commander, thanks!

--Billy