![]() |
Create a bunch of random TMP Files |
Post Reply
|
| Author | |
BK
Senior Member
Joined: 23-February-2005 Location: United Kingdom Online Status: Offline Posts: 26 |
Post Options
Quote Reply
Topic: Create a bunch of random TMP FilesPosted: 17-January-2008 at 10:58 |
|
' This script creates a whole load of TMP files in a directory. The directory and the number of file to create, is achieved via a prompt.
Set oFSO = CreateObject("Scripting.FileSystemObject")
sPath = InputBox("Enter the Path to where the Temp Files should be created, i.e. C:\Temp:", "Temp File Location", "C:\Temp") If sPath = "" Then
MSGBOX "InValid Path" MSGBOX "Exiting Script..." WScript.Quit Else For i = 1 to InputBox("Enter the Number of Temp Files to Create:", "Number of Temp Files", "1")
sFileName = oFSO.GetTempName sFullName = oFSO.BuildPath(sPath, sFileName) Set oFile = oFSO.CreateTextFile(sFullName) oFile.Close Next MSGBOX i-1 & " File(s) created in: " & sPath
End If |
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |