Page 1 of 1

How to update the default directory

PostPosted: 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.

Re: How to update the default directory

PostPosted: 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?