Thursday, 8 May 2014

Apple: Copy Files from One Folder to Another Folder Allowing User to Input Folder Name with AppleScript

The AppleScript below will allow you to copy the files from one folder to another folder which allows the user to input the folder name:
display dialog "What's your folder name?" default answer ""
set answer to text returned of result
set deskfolder to path to desktop folder as string
set desktopfolder to alias (deskfolder & "Test_FilesToBeCopiedFrom")
tell application "Finder"
copy every file of desktopfolder to folder answer of desktop
end tell

No comments:

Post a Comment