Custom renaming

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

Moderator: Mr_Noodle

Custom renaming Thu Oct 11, 2007 9:16 pm • by pensive612
First off, thank you for this great piece of software, i'm really enjoying it.

I'm creating a rule to rename, move and file sql.gz downloaded files...

my problem is getting it to rename a distinct name for the file.

it doesn't seem to recognize the domain, username, or anything other personal items.

So, what I'd settle for is a blank text box to popup, so i could add my custom rename when the hazel rule recognizes the file. in addition to it adding the date modified etc...

popuptextbox_dateModified.extension

is that possible? or is there another way to get a custom piece of text that could change depending on where i download the file from?

Thanks again.
pensive612
 
Posts: 4
Joined: Thu Oct 11, 2007 9:09 pm

Sat Oct 13, 2007 10:28 pm • by NeoHawkeye
How about using Automator in conjuction with Hazel.

Hazel initially recognises you have droped said file into directory this will then get automator to get a list of all the files in the directory whos name is sql.gz by using its filter system. Then get automator rename the files with a name of your choice and move the files.

This way automater will not trigger on every file like a folder script would as Hazel will only trigger the automator script on an sql.gz file being placed in there.

I use this on a few on my directorys.

Hope this might give you some ideas.

Craig
NeoHawkeye
 
Posts: 14
Joined: Mon May 28, 2007 4:39 pm

Sun Oct 14, 2007 12:56 pm • by Mr_Noodle
I'm not entirely clear on what you are trying to do here.

If you just want to use specific text in the rename, you can just type it in the box. Like:

my special name_(dateModified).(extension)

The values in parentheses are the lozenges that you drag into the field. The text before you can type in. The example at the bottom of that section should update to show you what the final file name will look like.

As for getting the domain in there, the domain is only recorded by Safari and Mail so if the files are coming from some other program, that information won't be available. For Safari and Mail, through, you can drop the (domain) attribute into the field. If it's not working for those two programs, let me know as maybe there's something else wrong.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Sun Oct 14, 2007 4:12 pm • by pensive612
Thanks Mr_Noodle and neo_hawkeye,

I'm actually using Firefox. so that's my problem there...

Basically what I'm trying to do is have a rule apply to any sql.gz file I download from phpMyAdmin.

I have tons of clients, so when I back them up, the file is downloaded as store.sql.gz

and I want to replace store with the name of the client, and the date.

But the client changes depending on whose database I'm downloading. So that would be a variable that is constantly changing.

I was thinking at worst, i could have a popup, and then just type "company"

and it would concatinate the filename....


I think NeoHawkeye might have found my closest answer for now.

thanks again guys.
pensive612
 
Posts: 4
Joined: Thu Oct 11, 2007 9:09 pm


Return to Support