provided by: 
Originally published at Internet.comThe scrrun.dll defines several objects for managing files. These facilities include the FileSystemObject and TextStream classes. FileSystemObject represents your PC's file system and includes such capabilities as creating temporary files, managing directories, and managing files. The TextStream class is defined to represent files as a contiguous stream of text data and makes managing text file content much easier than using the legacy VB Open, Close, Line Input, and other such commands. In this week's article I will demonstrate several of the basic capabilities of the Microsoft Scripting Runtime.
Before we begin, as a reminder you will need to add a reference to the Scripting Runtime library in VB6 from the Project|References menu. (Check the Microsoft Scripting Runtime reference and click OK in the Add References dialog.) The examples will use early bound objects rather than late bound objects using CreateObject, but you can use CreateObject and Variant types to dynamically load external libraries at runtime.
Creating a Temporary File
Sometimes you need to create a temporary file. Perhaps you need to persist the state of an object to the user's PC or make a backup file during a save operation. This example demonstrates how to use the FileSystemObject in the Scripting Runtime library to get a unique temporary file name and copy the contents to the temporary file...
Read article at Internet.com site