I am trying to find a procedure or function in Visual Basic that will go and look at a file and tell me if it is a valid Ascii file. Can anyone help????
I know of NO function to seperate files by such a distinction. It "could" - with some real definition of what you mean by an ASCII file be done fairly trivially.
I would Propose{/b] such a definition:
All bytes within the file be:
Between Chr(32) And Chr(94) OR
Between Chr(97) And Chr(126) OR
Equal Chr(10) OR
Equal Chr(12) OR
Equal Chr(13)
IF this definition - or some 'reasonable' (e.g. logically consistient) alternative is acceptable, I'm sure a 'quick and dirty soloution' can be generated. BUT, you will almost certainly be waiting for such a routine to verify a "Large" file fits such a definition (but probably not very long to find that it does NOT fit the definition).
MichaelRed
mred@att.net
There is never time to do it right but there is always time to do it over
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.