user1720207 user1720207 - 1 year ago 163
AppleScript Question

AppleScript droplet that moves file

trying to make an AppleScript droplet that moves a file to a given folder when the file is dragged to the droplet; not sure how to tell the script that the file I just dragged is the one I want to move; I tried this but it doesn't work:

on open dragged_file
tell application "Finder"
move dragged_file to "Macintosh HD:Users...etc."
end tell
end open --script runs but doesn't move file

Answer Source


on open of theFiles
    tell application "Finder"
        move theFiles to folder "Macintosh HD:Users...etc."
    end tell
end open
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download