I have a binary string that I need to write to a file. I have a feeling that this should be a simple procedure, but then again, VBScript. The FileSystemObject is of no help, since it munges the data. The Stream object looks promising, with it’s adBinaryMode and its Write method, but the Write method requires a byte array and won’t seem to accept a variant array instead. Since VBScript arrays are all variant arrays, this seems problematic.
So, how do I just write the data to a file?
EDIT: I should add that the whole thing has to be VBScript. No extra components. Sorry, I don’t like it either.
It’s also possible with the ordinary
FileSystemObject, here is code I’m using in custom upload script that I wrote long time ago using code I found online that converts binary string to ASCII: