Re: Newbe- Rename file names
Re: Newbe- Rename file names
- Subject: Re: Newbe- Rename file names
- From: Nathan Day <email@hidden>
- Date: Thu, 25 Jul 2002 23:38:22 +0930
for Mac OS X
look a the name extension property of file information (Standard
Addition), you can get the extension then create your new name with it
on the end then rename your file
for OS9
if this isn't supported on OS9 then you can get the extension with
to getExtension for aFile
set theName to name of (info for aFile)
if theName contains "." then
set {theOldDelimiter, AppleScript's text item delimiters} to
{AppleScript's text item delimiters, "."}
set theExtension to last text item of theName
set AppleScript's text item delimiters to theOldDelimiter
else
set theExtension to ""
end if
return theExtension
end getExtension
On Thursday, July 25, 2002, at 10:33 PM, John McMillan wrote:
New to scripting, but a few success under my belt.
I have a folder with a few hundred photoshop files, each a different
names
and a mix of formats.
I want to make a script which will remove the original file name and
rename
01-02-03 etc but keep the original suffix eg .eps .jpg .tiff
Can someone give me some pointers as to what is required to get a script
started -the simpler the better. Thanks John
Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.