Re: Joining slightly dissimilar files
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