Page 1 of 1
Rename textfiles containing "å", "ä" or "ö"

Posted:
Fri Aug 15, 2014 5:12 am
by mcfrojd
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.
Re: Rename textfiles containing "å", "ä" or "ö"

Posted:
Fri Aug 15, 2014 2:53 pm
by Mr_Noodle
You can try "contains match" instead which does a direct search. More reliable but also more time consuming.
Re: Rename textfiles containing "å", "ä" or "ö"

Posted:
Mon Aug 18, 2014 3:00 am
by mcfrojd
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.
Re: Rename textfiles containing "å", "ä" or "ö"

Posted:
Mon Aug 18, 2014 12:19 pm
by Mr_Noodle
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.
Re: Rename textfiles containing "å", "ä" or "ö"

Posted:
Mon Aug 29, 2016 7:27 am
by mcfrojd
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?
Re: Rename textfiles containing "å", "ä" or "ö"

Posted:
Mon Aug 29, 2016 7:40 am
by mcfrojd
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.
Re: Rename textfiles containing "å", "ä" or "ö"

Posted:
Mon Aug 29, 2016 2:02 pm
by Mr_Noodle
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.