Re: How do I get contents of a folder for renaming purposes?
Re: How do I get contents of a folder for renaming purposes?
- Subject: Re: How do I get contents of a folder for renaming purposes?
- From: Peter Baxter <email@hidden>
- Date: Mon, 30 Apr 2007 22:07:47 +1000
Hi Patrick,
I was thinking something along the lines of the following script may
do the trick:
tell application "Finder"
set languageGroup to every item of {"ITA", "FRE", "GER", "HEB",
"JAP", "RUS"}
repeat with curFile in languageGroup
try
do shell script "cp -r " & path to the original file & space &
("path to its enclosing folder" & languageGroup & "-TEST1-file.indd")
end try
end repeat
end tell
On 30/04/2007, at 8:33 PM, Patrik B. wrote:
Bow do I duplicate a file and change the name 15 times at the same
time. I.e.
ENG-TEST1-file.indd -- is the the original
Then I want to duplicate it and make out of it 15 newly renamed files.
The duplication is easy but how do I get the contents of the folder
and set
it to a variable that I can then cycle through and rename.
At the end I want to have files duplicated and renamed like this
ITA-TEST1-file.indd
FRE-TEST1-file.indd
GER-TEST1-file.indd
HEB-TEST1-file.indd
JAP-TEST1-file.indd
RUS-TEST1-file.indd
etc.
Based on my language prefix variable
How can I get the contents of a folder on OS 10.4.9?
Best, Patrik
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
Peter Baxter
email@hidden
Music creates order out of chaos: for rhythm imposes unanimity upon
the divergent, melody imposes continuity upon the disjointed, and
harmony imposes compatibility upon the incongruous.
-- Yehudi Menuhin
iChat email@hidden
_______________________________________________
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