How to create a large file (any format) using vbs or windows-based software tool ?
Question:
The correct way to do this would be to write a file. You can easily determine the size of file you want, by determining the sizeof a character and outputting that many characters.
Example of how to write create a file.
Option Explicit
Dim objFSO, objFSOText, objFolder, objFile
Dim strDirectory, strFile
strDirectory = "C:\bandwidth_test\"
strFile = "\test_file.txt"
' Create the File System Object
Set objFSO = CreateObject("Scripting.FileSy...
' Create the Folder specified by strDirectory on line 10
Set objFolder = objFSO.CreateFolder(strDirecto...
' -- The heart of the create file script -----------------------
' -- Creates the file using the value of strFile on Line 11
' ------------------------------...
Set objFile = objFSO.CreateTextFile(strDirec... & strFile)
Wscript.Echo "Just created " & strDirectory & strFile
Wscript.Quit
More Questions & Answers...