'Name: Fred Coleman 'Email_Address: fredkc@local.net 'Branch: 'Script_Type: vbscript 'Comment: 'takes a drive/folder name from input and return an HTML file listing of contents 'Script: '************************************************************** '* Directory Listing Script to HTML '* From a Design by Richard Harrison - richard.harrison@oldham.ac.uk '* Code taken from Donovan Kuln & Dale Ross postings on the '* newsgroup microsoft.public.scripting.wsh as well as example '* code from microsofts samples '* '* Last Updated - Aug. 12, 1998 '* '* Note '* 1) Needs a blank file by the name of DirList.txt in c:\ '* This is becuase the script will error if it cannot '* find it first time around. I dont know enough about '* scripting to know why you have to do this. '* '* 2) Note #1 is no longer the case. The program prompts the '* user for a starting folder for the listing and then puts '* the dirlist.txt file in that folder. If it exists, its '* overwritten, if not, created. '* '* This code added by Fred Coleman fredkc@local.net '* '* Sep. 13, 1998 '* '* 3) This version called Dirlist_H2.vbs writes the dir list '* to an HTML file: Dirlist.htm in the chosen sub/folder. '* '* This code cobbled by Fred Coleman fredkc@local.net '* With apologies to Richard Harrison. '* Sep. 15, 1998 '* '************************************************************** Option Explicit ' Create the FileSystem Object dim oFileSys, fh1, fh2, fh3, fh4, fh5 dim Dir, filcnt Dim Wedone Dim strDirDoneTxt Dim strMsgTitle dim strInput, strRunit Dim IExec, strTarget ' Change this file name if you ' want to use a different one. strTarget = "\DirList.htm" strInput= InputBox("Please Enter a starting folder", "User Input","") dir = strInput Set oFileSys = CreateObject("Scripting.FileSystemObject") set fh1=oFileSys.createTextFile(strInput & strTarget) fh1.WriteLine("") fh1.WriteLine("