Rename textfiles containing "å", "ä" or "ö"

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Is it possible to make a rule that finds textfiles containing any of the special swedish charters å, ä, ö, Å, Ä, or Ö

Mabye via some script or something?

Content Contain dont seem to work since it's not a word.
mcfrojd
 
Posts: 11
Joined: Fri Nov 19, 2010 5:31 am

You can try "contains match" instead which does a direct search. More reliable but also more time consuming.
Mr_Noodle
Site Admin
 
Posts: 11879
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Trying the Content - Contain Match with
If any
(...)å
(...)ä
(...)ö

but no luck, running on a test folder containing 3 files an 2 of these have swedish language.
mcfrojd
 
Posts: 11
Joined: Fri Nov 19, 2010 5:31 am

I don't think you need the ... before it as it's implied. If it still doesn't work, email support with a test file where it fails as well as the rule you are using.
Mr_Noodle
Site Admin
 
Posts: 11879
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Resuming this problem again.

I have noticed that my .srt files do not contain the swedish letters åäö, but uses other letters instead.
"Â", "‰" and "ˆ"

I can get this to work local on a folder on my mac mini, but when i move my testfiles to the same folderstructure on my nas the rules do not match.

https://www.dropbox.com/s/n418qfqmguw96uq/2016-08-29%2013_10_08-Mathias-Mac-mini%20-%20VNC%20Viewer.png?dl=0
(local)

https://www.dropbox.com/s/hzg02d9bgfdwl6z/2016-08-29%2013_10_53-Mathias-Mac-mini%20-%20VNC%20Viewer.png?dl=0
(Nas)

I have turned on debugging but i can not see anything special in the log.
it says
Code: Select all
2016-08-29 13:20:04.917 hazelworker[63792] DEBUG: Captain.America.Civil.War.2016.720p.BluRay.X264-AMIABLE.srt: Did not match any rules.

on the nas

and it says:
Code: Select all
2016-08-29 13:22:25.195 hazelworker[63899] Captain.America.Civil.War.2016.720p.BluRay.X264-AMIABLE.srt: Rule Kontrollera om undertexten är Svensk matched.
2016-08-29 13:22:25.197 hazelworker[63899] [File Event] File renamed: /Users/McFrojd/Torrent/Testmapp/svensk undertext/Captain.America.Civil.War.2016.720p.BluRay.X264-AMIABLE.srt renamed to /Users/McFrojd/Torrent/Testmapp/svensk undertext/Captain.America.Civil.War.2016.720p.BluRay.X264-AMIABLE.sv.srt.
2016-08-29 13:22:25.233 hazelworker[63899] DEBUG: Action changed file: Captain.America.Civil.War.2016.720p.BluRay.X264-AMIABLE.sv.srt

when i run it localy.

I have my nas shares mounted as afp:// shares and not smb:// if that makes any diffrent?
mcfrojd
 
Posts: 11
Joined: Fri Nov 19, 2010 5:31 am

Tested the same on a smb:// mounted share, no diffrent, seems like it wount read the content of the file.
I have a rule that rename the file to xxxx.en.srt if the swedish letters are not matched from contain, and that rule goes in on the swedish files when they are on the nas.
mcfrojd
 
Posts: 11
Joined: Fri Nov 19, 2010 5:31 am

In the preview, click on the red X badge. That will show you the text as Hazel sees it which should help track this down.
Mr_Noodle
Site Admin
 
Posts: 11879
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron