• 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 one file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: duplicate one file


  • Subject: Re: duplicate one file
  • From: Mirko <email@hidden>
  • Date: Sat, 03 Aug 2002 12:15:28 +0200

i have try the script of Emmanuel and Malcolm but i don't work...i get
syntaxe error....

thanks for help...



> De : Emmanuel <email@hidden>
> Date : Sat, 3 Aug 2002 11:18:23 +0200
> @ : Mirko <email@hidden>, applescript <email@hidden>
> Objet : Re: duplicate one file
>
> At 9:32 AM +0200 3/8/02, Mirko wrote:
>>
>> what i need is just the possibility to create thousand of copy of the same
>> file...
>
> Not sure what your problem is.
>
> duplicating files is the Finder's job. If you have not already, you should
> have a look at the Finder's dictionary. Did you try simply:
>
> ----------------
> set theFile to alias "Macintosh HD:myfile.htm"
> repeat 1000 times
> tell application "Finder" to duplicate theFile
> end
> ----------------
>
> A more sophisticated script would keep track in a list of the references of
> the duplicated files, so that renaming them would be easier.
>
---------------------

>

set _template to read (choose file {})
set _location to (choose folder {}) as string

repeat with i from 1000 to 2000
set fname to ("doc" & i & ".html")
set fRef to open for access file (_location & fname) with write
permission
write _template to fRef
close access fRef
end repeat


--
Malcolm Fitzgerald email@hidden
Database Manager http://www.asauthors.org
The Australian Society of Authors ph: 02 93180877 fax: 02
93180530
_______________________________________________
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: 
 >Re: duplicate one file (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: Trim?
  • Next by Date: Re: get default browser?
  • Previous by thread: Re: duplicate one file
  • Next by thread: Re: duplicate one file
  • Index(es):
    • Date
    • Thread