Re: error number -37 from list folder command
Re: error number -37 from list folder command
- Subject: Re: error number -37 from list folder command
- From: Axel Luttgens <email@hidden>
- Date: Mon, 7 Feb 2011 16:42:06 +0100
Le 7 févr. 2011 à 15:14, Jim Brandt a écrit :
> I have a script that uses the "list folder" scripting addition.
>
> set item_list to list folder source_folder without invisibles
>
> Yesterday, this script aborted with the error number -37 - "Bad name for file." It shows the folder name for the folder I'm trying to get a list of names for, but doesn't tell me the name of the offending file.
>
> How is it possible to create a file on disk that has a "bad filename" (wouldn't the OS object when the file was being created)?
Good question. :-)
Yvan already noticed that you are perhaps experimenting the announced obsolescence of the "list folder" command.
> Is there an easy way to determine the name of the offending file?
Since I can't imagine the exact problematic circumstances you are facing, none that I could conceive yet.
So, could you run this snippet:
set source_folder to alias "<HFS path of interest>"
tell application "System Events" to get name of (disk items of source_folder) whose visible is true
list folder source_folder without invisibles
in AppleScript Editor and show us the contents of the events log, so that we have something to crunch?
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden