Replace text issue

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

Moderator: Mr_Noodle

Replace text issue Tue Apr 03, 2012 3:03 pm • by Halvdan
I'm trying to rename some files and then move them from the download folder to another folder. I want to replace some of the filename but the option won't stick. Am I doing something wrong?

Code: Select all
if all conditions to any file or sub folder
   name contains 1234-
rename (name - replace 1234- with 2012-)(extension) 
move to designated folder


The files are moved but the name change doesn't occur
Ideally I would like just to remove the first part of the name - in other words - replace 'specified text' with 'nothing'
Halvdan
 
Posts: 6
Joined: Sat Mar 24, 2012 10:49 pm

Re: Replace text issue Tue Apr 03, 2012 3:33 pm • by Mr_Noodle
I assume you mean the text replacement is not working. The option sticks fine for me at least. If you mean that you set the option and when you go back and the option is not set anymore, then that means it's not sticking. If that's the case, then re-confirm as that's something totally different.

But yes, it seems that text replacement got broken for regular attributes when I fixed it for the custom ones. *sigh*

I don't know when the next patch will be but in your particular case, you can do it with custom tokens anyways. Match that part of the name you want to keep into a custom token and then just use that in the rename pattern. See the help for "match pattern" or "custom token".
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Replace text issue Tue Apr 03, 2012 5:51 pm • by Halvdan
Yes, when I set the option to replace text within the 'name' token, it won't stick. When I go back to check its back at whatever option it was prior to me trying to change it. ('No change', or 'lower case' or whatever) All the other options will stick, just not the 'Replace Text' option.

Your work around would be OK except the part of the name that I want to keep is the dynamic part - each file has a different name depending on when it was created. I just wanted to get rid of the generic identifier to make it 'cleaner' and easier to browse. But its not a biggie for me. Moving it will do for now
Halvdan
 
Posts: 6
Joined: Sat Mar 24, 2012 10:49 pm

Re: Replace text issue Wed Apr 04, 2012 11:40 am • by Mr_Noodle
The "case" options are totally separate from the text replacement. With text replacement, you, well, replace text. With the "lowercase/uppercase/etc" stuff, you are just specifying how to capitalize the words. Totally separate things. One option doesn't and shouldn't affect the other.

If anyone needs an urgent fix for this, email support and I'll look into putting up a test build for you.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Replace text issue Thu Apr 05, 2012 3:44 am • by nleco
hi guys,

I just bought hazel a few weeks ago. love it. i noticed as of 3.0.4, the replace option for a "name" token doesnt seem to work.

for example, i like to rename files like "SHOW.I.WATCH.S01E2.HDTV.720P.AVI" to "Show I Watch - S01E02 - 720p.avi". I acomplished this via a rename action:

(Rename) with pattern [(name)(extension)]

for (name), "No Change" was checked by default.
I instead checked "Replace Text...".
A popup showed up with "Replace [ ] with [ ] (-)(+)"
I entered a '.' in the first box and a ' ' (empty space) in the second and hit "done".
I opened it up again, and "No Change" was selected.

I created a video to illustrate the issue. SWF video
you can see the purple labeled file has periods. and when i run the rule, it seems to ignore the 'replace text' rule.

if this was changed, what would be the best way to accomplish this with Hazel since the title of my shows all contain periods in them.

also, I uninstalled hazel and reinstalled it, and it did not help.

* I may add, it would be nice if saving your rules could also save which folders you watched. that way you don't have to add the folders manually, import each rule, and enable the rules. I could very well be an idiot and missed how to do this.

thanks!

ps. i love hazel. seriously.
nleco
 
Posts: 8
Joined: Thu Apr 05, 2012 2:34 am

Re: Replace text issue Thu Apr 05, 2012 4:03 am • by Zettt
I can second this. As of version 3.0.4 there seems to be an issue with the renaming. I have a rule for ~/Downloads, which automatically renames and moves files. This action shows up in the preview as the next running action, but it's never executed. The rule matches though:

Code: Select all
2012-04-05 10:01:18.874 hazelworker[24397] Man vs Minecraft - [S3] Day 7 _Clues_ (Role-play)(720p_H.264-AAC).mp4: Rule Rename jDownloader videos matched.
2012-04-05 10:01:18.881 hazelworker[24397] Minecraft Adventures - The World Burns #2 (Kingdom of the Sky 2)(720p_H.264-AAC).mp4: Rule Rename jDownloader videos matched.
2012-04-05 10:01:18.890 hazelworker[24397] Sending metrics to scheduler. Next scheduled run: 2012-04-05 10:16:18.871


Here's the exported rule. http://dl.dropbox.com/u/6102/tmp/Rename ... hazelrules

EDIT: Sometimes the rule gets executed, but I haven't figured out when yet. Sorry.
Zettt
Zettt
 
Posts: 30
Joined: Wed Aug 29, 2007 8:50 am

Re: Replace text issue Thu Apr 05, 2012 12:44 pm • by Mr_Noodle
As mentioned above, text replacement is broken in 3.0.4. If it is urgent, please email me if you want a link to the test build when this is fixed otherwise wait for 3.0.5.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support