Scripting School: Writing output to a text file

One problem with producing output from a script is that it's temporary. Here's how you can make your scripts write the output to a text file using the File System Object.

By writing the output of your scripts to a file, you can preserve important output instead of just echoing to the screen. You can display hard-coded text and variable values or you can even operate on variables and show the results in the text file.

And, of course, you can time-stamp the text file to show when you created it.

Scripting School: Writing output to a text file

- Introduction

- Writing output to a file

- Using saved output

-  Summary

 

Read all of Christa's scripting columns:

ABOUT THE AUTHOR:
A Terminal Services MVP, Christa Anderson is the strategic technology manager for visionapp She formerly was program manager for the Microsoft Terminal Services team. She is an internationally known authority on scripting, the author of Windows Terminal Services, The Definitive Guide to MetaFrame XP, and co-author of the book Mastering Windows 2003 Server. If you have a scripting question for Christa, please e-mail her at editor@SearchWincomputing.com. She often uses these emails as fodder for her scripting columns.

Dig deeper on Microsoft Windows Data Backup and Protection

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchServerVirtualization

SearchCloudComputing

SearchExchange

SearchSQLServer

SearchWinIT

SearchEnterpriseDesktop

SearchVirtualDesktop

Close