|Feb 16, 2013, 09:56 PM||#1|
Applescript error - stripping file extension
Hi, I'm using OS 10.6.8 on a Macbook Pro.
I'm trying to do something that should be really easy. All I want to do is strip the extension off a file that is sitting on the desktop and which has been selected.
tell application "Finder" set OldName to selection set NewName to (characters 1 thru -4) as text set selection to NewName end tell
Can’t make «class docf» "exp.jpg" of «class cfol» "Desktop" of «class cfol» "home" of «class cfol» "Users" of «class sdsk» of application "Finder" into type number.
I read on this forum that that kind of message usually has to do with misplaced parentheses but I tried all kinds of iterations and couldn't get it to work. But I'm not even sure the applescript itself is correct
Appreciate any help you can give,
Last edited by maflynn; Feb 17, 2013 at 12:45 PM. Reason: Code tags added
|Thread Tools||Search this Thread|
All times are GMT -5. The time now is 06:19 AM.