Jump to content

MattRodkey

Member
  • Posts

    3
  • Joined

  • Last visited

MattRodkey's Achievements

Helping Hand

Helping Hand (3/5)

1

Reputation

  1. This works like a charm. Thanks for the help. One thing to note in the paste of code in my line above I accidentily added the osascript line a second time at the bottom. The real code should look like: extract the filename from a full path filename=$(basename "{query}"); # set the new destination newpath=`osascript -e 'set theFolderAlias to choose folder' -e 'set theFolder to (the POSIX path of theFolderAlias)'` destination="$newpath/$filename"; # move the file mv "{query}" $destination; # open it open $destination;
  2. Thanks that is a good start. I want to be able to select the destination every time so I tweaked your script to add some AppleScript for selecting a directory. # extract the filename from a full path filename=$(basename "{query}"); # set the new destination newpath=`osascript -e 'set theFolderAlias to choose folder' -e 'set theFolder to (the POSIX path of theFolderAlias)'` destination="$newpath/$filename"; # move the file mv "{query}" $destination; # open it open $destination; osascript -e 'set theFolderAlias to choose folder' -e 'set theFolder to (the POSIX path of theFolderAlias)'
  3. Hi, I have created a workflow that I trigger from Hazel so that a newly downloaded file pops up into Alfred. Ideally what I would like to do with many of these files is 1) Move them to a new location 2) Open them. Is this possible? I am guess that the answer is yes somehow, but I just can't seem to find it yet.
×
×
  • Create New...