Appleismylove
May 12, 2008, 04:45 PM
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...
set first_file to choose file without invisibles
set thepath to first_file as text
set theposix to POSIX path of thepath
:confused:
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:D
1. I have gotten the file name and converted it to a POSIX path using this...
set first_file to choose file without invisibles
set thepath to first_file as text
set theposix to POSIX path of thepath
:confused:
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:D
