How to update the default directory

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

Moderator: Mr_Noodle

How to update the default directory Mon Feb 27, 2017 10:51 am • by markfjohnson
My use case calls for the movement of a file name meeting a specific pattern to get moved from the ~/Downloads directory to a n application specific directory and then either open the file using excel or run a python script on that file. I can get it to work if I hard code the directory and new filename to to the excel / python calls. Is it possible though to extract the filename from the path store it in a new hazel property and also change the default directory so the excel call in a script command would be something like 'excel ${new file}' and have it run as it was in the new directory?

Thanks in advance for your assistance.
markfjohnson
 
Posts: 1
Joined: Mon Feb 27, 2017 10:32 am

Re: How to update the default directory Mon Feb 27, 2017 12:12 pm • by Mr_Noodle
Maybe I'm not following but Hazel does pass in the path of the file being processed into any scripts. Not sure where hardcoding is needed. Could you elaborate?
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support