1

I'm having trouble getting AppleScript to read a list of files from a folder without receiving the error message "Can't get every file from folder XXX"

set targetfolder to ("DICTAPHONE:DSS_FLDA:")
tell application "Finder"
 set fileselection to every file in targetfolder
endtell

This worked flawlessly before upgrading to Mavericks. Paths are correct. I tried it with a different folder on my startup disk and got the same result.

2 Answers 2

2

Try using folder targetfolder instead of targetfolder:

set targetfolder to ("Macintosh HD:Library:Desktop Pictures")
tell application "Finder"
    files of (folder targetfolder)
end tell
Sign up to request clarification or add additional context in comments.

Comments

0

Try this to get the information:

set targetfolder to (path to desktop as alias)
tell application "Finder"
    set fileselection to get the name of every file of targetfolder
end tell

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.