Okay, so i'm working on an applescript that gets the file name of a user chosen file (actually i'm making an entire application around it), and i need help. 2 questions
1. I have gotten the file name and converted it to a POSIX path using this...

How do i get JUST the file name and extension. For example if i get this file /zzz/xxx/ccc/abc.txt
All i want is the file name (abc.txt) set to a variable like theextension
2. How do i set the rest of the file path to another variable (/zzz/xxx/ccc/) ? I have been having A TON of trouble with this, and all help is appreciated
1. I have gotten the file name and converted it to a POSIX path using this...
Code:
set first_file to choose file without invisibles
set thepath to first_file as text
set theposix to POSIX path of thepath
How do i get JUST the file name and extension. For example if i get this file /zzz/xxx/ccc/abc.txt
All i want is the file name (abc.txt) set to a variable like theextension
2. How do i set the rest of the file path to another variable (/zzz/xxx/ccc/) ? I have been having A TON of trouble with this, and all help is appreciated