Re: Name of file
Re: Name of file
- Subject: Re: Name of file
- From: KOENIG Yvan <email@hidden>
- Date: Fri, 11 Jan 2008 16:49:47 +0100
Le 11 janv. 2008 à 16:19, Benedikt Quirmbach a écrit :
Hello,
with
set thecsvfile to (choose file with prompt "Wählen Sie die CSV-
Datei:" of type {"TEXT"}) as alias
I start reading a csv file.
How can I get the name of this file (without the extension)?
Example:
I choose "MyCSV.csv" and want to get "MyCSV".
You may try:
set thecsvfile to (choose file with prompt "Wählen Sie die CSV-
Datei:" of type {"TEXT"}) as alias
tell application "Finder"
try
set xt to name extension of thecsvfile
set nn to name of thecsvfile
set nn to text 1 thru -((length of xt) + 2) of nn
set name of thecsvfile to nn
end try
end tell
Yvan KOENIG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
References: | |
| >Name of file (From: Benedikt Quirmbach <email@hidden>) |