• 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: Joining slightly dissimilar files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Joining slightly dissimilar files


  • Subject: Re: Joining slightly dissimilar files
  • From: Kurt Klamp <email@hidden>
  • Date: Wed, 12 Dec 2007 19:56:28 +0100

Hi Peter,



HI scripters,

I have another job for a school in which I have to join together any two pdf files which have the first 18 characters of their name the same. The last 4 characters will be dissimilar. I have made the part of the script that joins them, but I need to alter the following script to include files that do not have the same name:

tell application "Finder"
set the year_10_source_folder to name of (every file of entire contents of (choose folder with prompt "Pick your folder with year 10 reports."))
end tell
my find_duplicates(year_10_source_folder)


on find_duplicates(year_10_source_folder)

copy year_10_source_folder to sign_years repeat with i in ref to sign_years set contents of i to (text 1 thru 18 of (get contents of i)) end

tell application "Finder"
set the vce_source_folder to name of (every file of entire contents of (choose folder with prompt "Pick your folder with VCE reports."))
end tell

copy vce_source_folder to sign_vce
repeat with i in ref to sign_vce
set contents of i to (text 1 thru 18 of (get contents of i))
end
set return_list to {}
set i to 1
repeat with an_item in sign_vce
if sign_years contains an_item then set end of return_list to (get item i of vce_source_folder)
set i to i +1
end repeat
return return_list
end find_duplicates



HTH Kurt _______________________________________________ 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
References: 
 >Joining slightly dissimilar files (From: Peter Baxter <email@hidden>)

  • Prev by Date: Joining slightly dissimilar files
  • Next by Date: Re: dev tools
  • Previous by thread: Joining slightly dissimilar files
  • Next by thread: Has Apple updated the Applescript Language Guide yet?
  • Index(es):
    • Date
    • Thread