I can get the names of all files in a folder by doing this:
tell application \"Finder\" set myFiles to name of every file of somePath end tell
For a single file I found the answer here, copied below.
set theFileName to "test.jpg" set thePrefix to text 1 thru ((offset of "." in theFileName) - 1) of theFileName