• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: duplicate file with number
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >duplicate file with number (From: Mirko <email@hidden>)

  • Prev by Date: Re: Write to file??
  • Next by Date: TextEdit and Text Item Delimiters
  • Previous by thread: duplicate file with number
  • Next by thread: Re: Write to File
  • Index(es):
    • Date
    • Thread