Re: Script to change file name
Re: Script to change file name
- Subject: Re: Script to change file name
- From: Mark Peyer <email@hidden>
- Date: Wed, 14 May 2003 19:28:14 +0200
Am 13.05.2003 21:50 Uhr schrieb "email@hidden"
unter <email@hidden>:
>
Script to change file name
Hi,
My code which does not function is
tell application "Finder"
activate
duplicate file "A:B:C:xyz" to "D:E:xyz" replacing yes
(*set theDate to current date
if month of theDate = January then
set theMonth to "01"
else if month of theDate = February then
set theMonth to "02"
else if month of theDate = March then
set theMonth to "03"
else if month of theDate = April then
set theMonth to "04"
else if month of theDate = May then
set theMonth to "05"
else if month of theDate = June then
set theMonth to "06"
else if month of theDate = July then
set theMonth to "07"
else if month of theDate = August then
set theMonth to "08"
else if month of theDate = September then
set theMonth to "09"
else if month of theDate = October then
set theMonth to "10"
else if month of theDate = November then
set theMonth to "11"
else if month of theDate = December then
set theMonth to "12"
end if
set theYear to year of theDate as text
set theTag to get characters 3 through 4 of theYear & theMonth & day of
theDate as string*)
set theName to "D:E:xyz"
set theName to theName & "." & theTag as string
set file "D:E:xyz" to theName
end tell
Thanks for your help!
--
Mark A. Peyer
_______________________________________________
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.