Page 1 of 1

Name a created file with the name of the original

PostPosted: Tue Apr 26, 2011 6:09 pm
by Scooter
Sounds odd, but will make sense when you see what i'm trying to do. I would like drop a text file in a watched folder, have the Services from Textedit called "Text to Spoken" (actually, I'm using a copy of it, tailored to my needs) crate an audio file, then rename that audio file to the same name as the original file. This shouldn't be a finder problem because the extension will change, but I can't seem to 're-target' the rename to the created file rather than the dropped one. Right now it's renaming the original text file to itself. How would I do this?

Re: Name a created file with the name of the original

PostPosted: Wed Apr 27, 2011 2:44 pm
by Mr_Noodle
Hard to say without more info. Could you post your rule (screenshot or a more detailed description)? Also, check the logs. Go to the "Info" section and click on "View Log". Search for the file in question and post what you find.

Re: Name a created file with the name of the original

PostPosted: Thu Apr 28, 2011 9:29 pm
by Scooter
Actually, I did it in Automator and applescript and set Hazel to run it.

But was needing it to open a file in textedit, select all, create and audio file (automator) then rename the new audio file to the name of the original text file. Seems simple but Hazel seemed to hold on the 'active' file as the original text file, not the audio file created.

I'm sorry, I don't have what I was working on since I found another way.

Re: Name a created file with the name of the original

PostPosted: Mon May 02, 2011 1:23 pm
by Mr_Noodle
There's no way for Hazel to know if your Automator workflow creates or moves some other files. If you did it in AppleScript, you could report back the path of the new file. You can check the help on how to do this.