Reputation: 313
I am trying to display the extension for a file that I choose. What am I doing wrong?
set theFile to (choose file with prompt "Select a file to transfer:")
set ext to name extension of theFile
display dialog ext as text
Upvotes: 2
Views: 342
Reputation: 11
tell application "Finder" set theFile to choose file {} set ext to name extension of theFile display dialog "la extenxion es " & ext end tell
Upvotes: 1
Reputation: 11238
Try:
tell application "System Events" to set ext to name extension of theFile
Upvotes: 2