AppleScript gives you access to information about files and folders through the info for command, which has the following syntax.
info for file FileName
FileName represents the complete path and filename of the file or folder for which information is to be retrieved. To see this command in action, take a look at the following statement.
set FileData to ¬ (info for file "Macintosh HD:Users:jerryford:Documents:PartsDB.txt")
Here, the info for command is being used to retrieve file information for a file named PartsDB located in Macintosh HD:Users:jerryford:Documents:. The info for command retrieves a great deal of information about the target file or folder. For example, the previous statement will return ...