symbols, faces, hearts etc.
Hi !
Sometimes I download some audio or video files that have Decorations of symbols, faces, hearts etc.
Like emoticons !
These are in random positions of the file name .
Is there any method to eliminate them as a batch?
And I read in another post about a new ver 4.18 coming next week is that right ?
Thanks
Sometimes I download some audio or video files that have Decorations of symbols, faces, hearts etc.
Like emoticons !
These are in random positions of the file name .
Is there any method to eliminate them as a batch?
And I read in another post about a new ver 4.18 coming next week is that right ?
Thanks
Reply to #1:
Hi!
Have you read about the Trim method?
https://www.advancedrenamer.com/user_guide/v4/method_trim
You can add any character or emoji you want to trim from a file name.
Open the Trim method and insert a symbol, character or emoji into the Trim characters field.
In the Location field, select 'All' or another location based on the position of the symbol in the file name.
I hope this helps!
Hi!
Have you read about the Trim method?
https://www.advancedrenamer.com/user_guide/v4/method_trim
You can add any character or emoji you want to trim from a file name.
Open the Trim method and insert a symbol, character or emoji into the Trim characters field.
In the Location field, select 'All' or another location based on the position of the symbol in the file name.
I hope this helps!
Reply to #1:
Rather than pasting in what could be potentially tens of thousands of characters, Use regular expressions.
Create a "Remove pattern" and check the "Use regular expressions" box.
For the Pattern, use:
[^\w ()'.-]
(Copy and paste that next line, it has a space in it)
That will strip out all but: English characters, digits, and the most common allowed punctuation.
Alternatively, use a replace method and set the replace character to something like: (space, or dash, or underscore).
For an explanation of that regex, see: https://regex101.com/r/zbyoQ8/1
ETA: So far, I can't get Aren to use Unicode regex, so if your files are named in a language other than English, you may have to use javascript or another approach.
Rather than pasting in what could be potentially tens of thousands of characters, Use regular expressions.
Create a "Remove pattern" and check the "Use regular expressions" box.
For the Pattern, use:
[^\w ()'.-]
(Copy and paste that next line, it has a space in it)
That will strip out all but: English characters, digits, and the most common allowed punctuation.
Alternatively, use a replace method and set the replace character to something like: (space, or dash, or underscore).
For an explanation of that regex, see: https://regex101.com/r/zbyoQ8/1
ETA: So far, I can't get Aren to use Unicode regex, so if your files are named in a language other than English, you may have to use javascript or another approach.
Reply to #3:
Hi George,
This *might* do what you want. Just a little script method:
// --------------------------
n = item.newBasename ;
nArr = n.split("") ;
for (j = 0; j < nArr.length; j++) {
if ( nArr[j].charCodeAt(0) < 32 || nArr[j].charCodeAt(0) > 126 ) {
nArr[j] = "" ;
}
}
return nArr.join("") ;
// --------------------------
(Don't forget to press the "Apply script" button to see the change).
You can always change the line that reads
nArr[j] = "" ;
to something else like
nArr[j] = "_" ;
if you want to *replace* the non-ASCII characters with a different symbol. Like Randy said, if you want non-English we'll need to know what characters you want to allow (but you're in the US, so this will probably do approximately what you want). : )
EDIT: I know Randy's or Styb's methods will work; this is just another option for you. People tend to get all flustered when they see "javascript" or "program code", but if a dufus like me can do it it's really not that tough to do simple tasks with scripts. :) END EDIT
Best,
Df
Hi George,
This *might* do what you want. Just a little script method:
// --------------------------
n = item.newBasename ;
nArr = n.split("") ;
for (j = 0; j < nArr.length; j++) {
if ( nArr[j].charCodeAt(0) < 32 || nArr[j].charCodeAt(0) > 126 ) {
nArr[j] = "" ;
}
}
return nArr.join("") ;
// --------------------------
(Don't forget to press the "Apply script" button to see the change).
You can always change the line that reads
nArr[j] = "" ;
to something else like
nArr[j] = "_" ;
if you want to *replace* the non-ASCII characters with a different symbol. Like Randy said, if you want non-English we'll need to know what characters you want to allow (but you're in the US, so this will probably do approximately what you want). : )
EDIT: I know Randy's or Styb's methods will work; this is just another option for you. People tend to get all flustered when they see "javascript" or "program code", but if a dufus like me can do it it's really not that tough to do simple tasks with scripts. :) END EDIT
Best,
Df