Move-copy-alias selected file to chosen destination folder
Move-copy-alias selected file to chosen destination folder
- Subject: Move-copy-alias selected file to chosen destination folder
- From: Barry Fass-Holmes <email@hidden>
- Date: Tue, 16 Apr 2019 13:28:48 -0700
Hello,
I am trying to find or make substitutes for some of FinderPop’s functionality
to use under Mojave (which has broken FinderPop, and it won’t be updated for
compatibility; http://www.finderpop.com/fnarr/fp/
<http://www.finderpop.com/fnarr/fp/>) before upgrading my Mac from High Sierra
(under which FinderPop does function).
Specifically, my goal is to replace the move-copy-alias dialog which displays
when you select a file or folder in the Finder, then navigate through
FinderPop’s hierarchical menus to the desired destination for the file.
FinderPop's dialog contains 4 main buttons…Move, Copy, Alias, and No (i.e.,
cancel).
http://www.finderpop.com/Images/MoveCopyAlias.jpg
<http://www.finderpop.com/Images/MoveCopyAlias.jpg>
My web searches found AppleScripts for moving or copying a selected file to a
chosen destination.
However, the following script, using move or copy in line 4, returns an error
message.
set mySelection to selection
set theDestinationFolder to choose folder with prompt "Select a destination
folder:"
tell application "Finder"
move mySelection to theDestinationFolder
end tell
To display a dialog similar to FinderPop’s, the following script does work (at
least within the scope of my QA testing). Since the resulting Save As dialog
contains a Cancel button (and New Folder one), the above No button is less
necessary than the other three and thus is excluded.
set theMethod to button returned of (display dialog "Do you want to move, copy
or alias the selected file to the destintation folder?" buttons {"Move",
"Copy", "Alias"} default button "move")
set theDestination to (choose folder with prompt "Select your destination")
display dialog (theMethod & " to " & theDestination)
Could someone please help with the problems below?
1. AppleScript for making an alias of a selected Finder file in the user’s
chosen destination—the following script, under High Sierra, consistently
returns error number -1728 from item 1 of selection
set thefolder to choose folder with prompt "Choose destination folder:"
tell application "Finder"
set mySelection to selection
repeat with aSel in my selection
make alias to aSel at thefolder
end repeat
end tell
2. In addition, include in the script the appropriate commands for deleting the
word “alias” that macOS appends to the end of the alias’ filename.
3. Fix for the above move/copy script.
4. Integrate these scripts so that they all work together when accessed from
the dialog.
Many thanks in advance!
Barry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden