Re: duplicate file with number
Re: duplicate file with number
- Subject: Re: duplicate file with number
- From: John Delacour <email@hidden>
- Date: Wed, 31 Jul 2002 21:34:28 +0100
At 4:03 pm +0200 31/7/02, Mirko wrote:
I need to duplicate one html file in thousand of same copy.... i would like
the file get the name like : 1.html, 2.html, 3.html...and so....
With the actual applescript available on apple site is possible to add or
remove prefix or suffix of file...but not to duplicate like that
(* Classic *)
set ls to {}
repeat with i from 1 to 1000
set i to text -4 through -1 of ("000000" & i)
set end of ls to "" & i & ".html"
end repeat
ls
--
(* OS X *)
--
set pl to "perl -e '
for $i (1..1000) {
printf q~d%s~, $i, qq~.html\\r~;
}
'"
do shell script pl
--
Is that the sort of thing you want?
JD
_______________________________________________
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.