Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parsing a large text file



Thanks for the input.
I ended up using:
--
set theFile to choose file with prompt "Please select the file to read from..."
set inFile to open for access theFile
set theFile to choose file name with prompt "Save transformed data..."
set outFile to open for access theFile with write permission
repeat
try
set dataLine to read inFile until return
on error
close access inFile
close access outFile
return
end try
-- do what you want with the line of data
write dataLine to outFile
end repeat
--
It worked great for the intended purpose.


The file I'm parsing is indeed 32 MB.

Although I'd like to use shell scripting, I feel overwhelmed just getting AppleScript to work.

Thanks again.
--
DOS

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.