vbscript write to textfile

alreadyused

Well-known member
Joined
Jan 13, 2006
Messages
70
We have an old mail server running MS Exchange 5.5. I was asked to write a script to get the mailbox sizes, and found the MSDN article related to it.

When doing this as a script, I can get it to run fine, but the problem is that I dont know how to write it out to a text file. I can Echo it back, but then cant do anything with it; the cmd window wont let me copy the text.

I did try running it as an executable instead, and everything worked fine except for getting the actual information that I wanted! I think that had to do w/ the variables, but this is soupposed to be a quick fix for the IT Mgr, so Im trying to spend as little time on it as possible.

Long story short, keeping this as a script, what should I be using for writing this out to a text file? It did not care for System.IO.Streamwriter, and anyone who has written script is probably saying duh!

FYI the server has Net 1.1 installed, but not Net 2.0.
 
If it is just a vb script you are using then it will not have access to the .Net runtime, you would need to use the features of the scripting runtime itself. For the purposes of file io etc. there Is the FileSystemObject which should do what you need.
 
Back
Top