Re: shameless begging
Re: shameless begging
- Subject: Re: shameless begging
- From: Michelle Steiner <email@hidden>
- Date: Thu, 21 Sep 2006 07:50:26 -0700
On Sep 21, 2006, at 7:21 AM, Michelle Steiner wrote:
I think that this should do it for you; I didn't test it, though.
Nor did I remember to paste it into the message. *sigh*
Also, the script assumes that the first five characters of each line
are unique; you may need to use a longer snippet of the line if this
is not the case.
set source_file to choose file with prompt string "Choose the file to
process." default location (path to desktop) without invisibles
set destination_folder to (choose folder with prompt string "Where
should the output go?" default location (path to desktop) without
invisibles) as text
set source_data to paragraphs of (read source_file)
repeat with this_line in source_data
try
set title to text 1 through 5 of this_line
on error msg
set title to this_line
end try
set file_name to destination_folder & title
set file_ref to open for access file_name
write this_line to file_ref
close access file_ref
end repeat
-- Michelle
--
"Push to test." (click) "Release to detonate."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden