----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 06, 2000 6:46 AM
Subject: [REBOL] Salvaging ASCII data from binary file
> Hi,
>
> I have been given a messed up (beyond hope) database file of 5MB and would
> like to remove all the extended and unprintable characters, then save the
> result as a text file. The following displays the characters:
>
> good-chars: charset [#" " - #"/" #"0" - #"9" #"A" - #"Z" #"a" - #"z"]
> file: to-file ask "Filename? "
> data: read/binary file
> forall data [
> if find good-chars first data [
> print to-string copy/part data 1
> ]
> ]
>
> but what is the best way to collect all of these and save as a plain ASCII
> text file, say, good.txt ?
>
> Thanks,
Hi Peter,
Assuming your above code works..You could try just replacing print with
write/append.
if find good-chars first data [
write/append %good.txt to-string copy/part data 1
]
Cheers,
Allen K
>
>
> --------------------------------------
> Peter H. Geddes; Savannah, Georgia USA
> <mailto:[EMAIL PROTECTED]>
> --------------------------------------
>
>