• 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: Merge all names into 1 file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Merge all names into 1 file


  • Subject: Re: Merge all names into 1 file
  • From: "Mark J. Reed" <email@hidden>
  • Date: Mon, 6 Nov 2006 09:37:35 -0500

On 11/6/06, Jan Bultereys <email@hidden> wrote:
 I have 7 text files
 ....

 Is it possible to merge the 7 files into ONE where all the "duplicated"
names are merged into one.

Sure.

do shell script "sort -u " & (quoted form of POSIX path of file1) & "
" & (quoted form of POSIX path of file2) & " "  & ... & " " & (quoted
form of POSIX path of file7) & ">" & (quoted form of POSIX path of
resultFile)

if you have the filenames in a list you can of course build the
command string up with a loop, which would be less unwieldy (more
wieldy?). If you really want 'all the files in this folder' then that
would be a better way to approach it, too.  The important thing is
that you wind up with a shell command that consists of "sort -u "
followed by the quoted POSIX paths of all the files, separated by
spaces, followed by ">" and the quoted POSIX path of the file you want
the sorted uniquified results to go into.



--
Mark J. Reed <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/mailman//archives/applescript-users

This email sent to email@hidden
References: 
 >Merge all names into 1 file (From: Jan Bultereys <email@hidden>)

  • Prev by Date: Re: setting file/folder icon by AS ?
  • Next by Date: Re: setting file/folder icon by AS ?
  • Previous by thread: Re: Merge all names into 1 file
  • Next by thread: Re: Merge all names into 1 file
  • Index(es):
    • Date
    • Thread