Very dumb question about alias

Hi,

I’ve never been able to understand the following code:


set this_folder to (choose folder with prompt "Pick the folder containing the files to process:") as string
tell application "System Events"
	set these_files to every file of folder this_folder
end tell
repeat with i from 1 to the count of these_files
	set this_file to (item i of these_files as alias)
	set this_info to info for this_file
	if visible of this_info is true and alias of this_info is false then
		-- insert actions here for: this_file
	end if
end repeat

If I’ve just made this_file into an alias (set this_file to (item i of these_files as alias), then why does alias of this_info for this_file return false?

You are dealing with two different meanings of “Alias” here.

“item i of these_files as alias” is telling the script that the variable you are defining is an alias reference, as opposed to a path string or something else.

“alias of this_info is false” is checking if the actual file that you are pointing to (with the above reference) is a regular file in your finder or if it is an alias pointer.

Model: iMacintel
AppleScript: xCode 3.0
Browser: Safari 525.20.1
Operating System: Mac OS X (10.5)

Thanks. I get it now.