Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 5, 2011, 03:38 PM   #1
the Otter
macrumors member
 
Join Date: Jan 2001
Location: Lafayette, IN
Send a message via AIM to the Otter
AppleScript: list files in folder

Okay, folks. This is an incredibly weird one. I know this has worked before. I stripped the code down to its barest form, so here it is, in its entirety:

Code:
tell application "Finder"
	set theFolder to choose folder
	set fileList to every file in theFolder
end tell
When I run it—regardless of the folder I choose—I get the following message:

AppleScript Error
Finder got an error: Can’t get alias "[path to folder]".

Anyone got any thoughts? I’m banging my head against this one.
__________________
“Aunque el mono se vista de seda, mono se queda.”
the Otter is offline   0 Reply With Quote
Old Apr 5, 2011, 03:49 PM   #2
chown33
macrumors 603
 
Join Date: Aug 2009
What OS version?

Where are you running it from? AppleScript Editor? Something else?

Exactly which folders have you tried it on? Be specific.

What user account are you logged in as?


Break It Down.

If you take out the second line, what is the resulting theFolder value? What is its type? Is it a string, an alias, a fnord, something else?

If you change the variable name from theFolder to myFolder or eineKleineFnordMusik, what happens?
chown33 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Tags
applescript, error, files, folder

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Copy files to folder using Applescript Kitkat88 Mac Programming 7 Jun 23, 2014 07:45 AM
select data to use in "Choose From List" list in applescript ShuddaRunThat Mac Programming 2 Apr 1, 2014 06:31 PM
sorting a list of dates and times (applescript) wild4life2013 Mac Programming 2 Sep 6, 2013 08:02 PM
AppleScript - Button Returned of Results from a List JPinto Mac Programming 1 Jan 13, 2013 02:02 PM
Resolved: Applescript: List/txt.file question h1068 Mac Programming 5 Jul 3, 2012 06:30 PM

Forum Jump

All times are GMT -5. The time now is 03:44 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC