I’m sure this is an easy question, but I have been searching the forums without success, I also looked at the Open Panel example.
I want to copy one file and move it to another, so I used this code:
tell application "Finder" set myFile to choose file duplicate myFile to folder "Test" of parentFolder with replacing end tell
To make the app look cleaner, I want to use the open panel attached to the window.
on clicked theObject tell open panel set prompt to "Choose file" set can choose directories to false set can choose files to true end tell display open panel attached to window of theObject end clicked
The open panel example gives the path names, how do I just get the filename?
Also, the same will apply to folder items, I use this code:
tell application "Finder" set theFolder to choose folder duplicate (get items of theFolder) to folder "Test" of parentFolder with replacing end tell
How will I be able to accomplish this with the open panel attached to theObject?
Thank you in advance.