file size does not work

Hi I just develop a script that gets the file size of the current AppleScript


set x to path to me
set thesize to size of (info for x) as number
display dialog thesize

This works just fine, but when I try to get the file size of a different file I get an error. Here is the second code!


set x to path to me
set f to x & "Contents:Resources:apps.icns" as text
set iconsize to size of (info for f) as number
display dialog iconsize

Any idea wy the second applescript does not work?

Brian

Yes.

info for expects an alias as parameter, the variable f is just a string


set iconsize to size of (info for alias f) as number