mistux Site Admin
![](images/avatars/gallery/Miscellaneous/pc_user.gif)
Joined: 25 Jun 2004 Posts: 1042 Location: South Bend, Indiana USA
|
Posted: Mon Jun 19, 2006 9:39 am Post subject: VB Script for making test files |
|
|
This VBScript will crate as many test files as you want.
Code: |
' ======================================================
' Purpose: This will make as many files as you want, in
' the directory you want.
' Usage: intHowManyFiles is how many files you want created.
' intStart is the number you want to start at.
' You can also specify the path and the string
' that gets inserted into the file.
' Author: Michael J. Mitchell
'========================================================
DIM intStart, intx
DIM fso, NewsFile
DIM intHowManyFiles
'==================
intHowManyFiles=1
intStart= 0
'=================
DO
intStart = intStart+ 1
intx = intStart+ intStart
Set fso = CreateObject("Scripting.FileSystemObject")
'=====================================================
'====Change the path here=======
Set NewsFile = fso.CreateTextFile("c:\predator_test\" & intStart& ".txt", True)
'====Change the text in the file here=======
NewsFile.WriteLine("Test" & intStart)
'=====================================================
NewsFile.Close
Loop Until intStart= intHowManyFiles
msgbox "Finished making " & intHowManyFiles & " Files"
|
I have made about 70,000 files in about 10 minutes using this. |
|