• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Name of file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Name of file


  • Subject: Re: Name of file
  • From: demski <email@hidden>
  • Date: Fri, 11 Jan 2008 17:15:54 +0100


Am 11.01.2008 um 16:49 schrieb KOENIG Yvan:

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

I had just hacked in my (worse) solution, as your answer arrived, yvan...
But, I have a little question here:
shouldn't there be
set nn to text 1 thru -((length of xt) + 1) of nn --< +1 instead of 2 ??


when I try it, there seems to be always the last letter missing...

Am I blind to something?

greetz, demski

_______________________________________________
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>)
 >Re: Name of file (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Re: Mail and AppleScript frustration (newbie)
  • Next by Date: Re: How do you add a track not currently in iTunes to iTunes playlist using applescript
  • Previous by thread: Re: Name of file
  • Next by thread: Re: Name of file
  • Index(es):
    • Date
    • Thread