1
votes

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

2 Answers

2
votes

Try using folder targetfolder instead of targetfolder:

set targetfolder to ("Macintosh HD:Library:Desktop Pictures")
tell application "Finder"
    files of (folder targetfolder)
end tell
0
votes

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