determining a plain text file

Bill Marriott wjm at wjm.org
Sun Jul 9 23:33:26 EDT 2006


Slightly more clever (length isn't actually needed)

put url "file:{yourfile}" into daFile
if daFile = replacetext (daFile,"[^\x20-\x7E\n\r\t]","") then put "Plain 
text."


J. Landman Gay wrote:
> Bill Marriott wrote:
>> put url "file:{yourfile}" into oneFile
>> put replacetext (oneFile,"[^\x20-\x7E\n\r\t]","") into twoFile
>> if length(oneFile) = length(twoFile) then put "It's a plain text file."
>
> That's pretty clever.






More information about the use-livecode mailing list