Opening / Reading binary files 
Author Message
 Opening / Reading binary files

Hi Raman,

Not using standard FSO stuff.
However, as a coinsidence I am in the final stages
of completing a Binary object for Jscript just to accomplish this
thing. It internally uses ADODB.Stream/RecordSet and  the
Msxml2.DOMDocument interfaces to handle the conversion/file stuff.
no 3rd party software involved.

Intended for use in a WSH environment mainly, but it should run fine hosted
in a
MSIE 5+ and an ASP environment too as long as ADODB 2.5+ and Msxml2
is present.

It's currently incorporated in a script-lib project I am working on, Soya,
but it can easily be made self contained. want a testdrive. just let me

I knocked this one up mainly for 4 purposes.
1. xmlhttp binaryresponse -> binary file
2. binary file -> base64/hex encoded string
3. ascii string -> binary file. (this one rocks! ..eventhough its slow)
4. binary file -> hex -> custom manipulation -> back to binfile

 var oHTTP = new ActiveXObject("microsoft.xmlhttp");
 oHTTP.Open("GET", " http://www.*-*-*.com/ ;, false);
 var oBin = new Soya.IO.Binary(oHTTP.responseBody);"sunet.gif");
 var oBin = new Soya.IO.Binary();
 var sBase64Image = oBin.toBase64();
 var sGif =

 var oBin = new Soya.IO.Binary(sGif);"surprise.gif");


  http://www.*-*-*.com/ | http://www.*-*-*.com/

> Is there a way to open and read binary files using
> JScript? I know that the FSO object supports text files.
> However, it's not very clear on the support for binary
> files.

> Thanks,
> Raman.

Sun, 27 Jun 2004 07:47:37 GMT  
 Opening / Reading binary files
be sure to post an ANNC when you're ready :)

Sun, 27 Jun 2004 08:22:40 GMT  
 [ 2 post ] 

 Relevant Pages 

1. open a binary file for reading/writing

2. Reading binary files in VBScript

3. Reading binary files in VBScript

4. can vbscript read BINARY files?

5. Reading in a binary file...

6. Reading binary file

7. Reading binary file using VBScript

8. reading binary file in vbscript

9. How to read binary files?

10. Reading binary data in a postscript file

11. How can I read binary file???

12. Reading the Binary file using FileSystem Object


Powered by phpBB® Forum Software