Tuesday, July 2, 2013

Write output file

Create a filesystem Object

 

Set objFSO = CreateObject("Scripting.FileSystemObject")

 

 

Create a output file’s path

 

Set outFile = objFSO.CreateTextFile("i:\ASQ\import.bat", True)

 

 

Input the Value that you would like to input

 

outFile.WriteLine "Here you are writing it in the file"

Related Posts:

  • Check file exist Here is how to check for file exist while we copy to or from machine’s data Example below show the checking of CMD.exe in Windows\system32 folder… Read More
  • Run CMD in VBS create a blank text file and put in the code below Set objShell = CreateObject("WScript.Shell") objShell.run("ping 127.0.0.1") Save the fil… Read More
  • Create Input Box create a blank text file and put in the code below myInputBox = Inputbox("Here will show up the detail of the description","This is Input Box") … Read More
  • Folder Creation Here is how you create a folder Just put in the folder destination on the 2nd line and the name of the folder follow by “\” Set objFSO = Cr… Read More
  • Check folder Existence Checking of folder existence to minimise extra step in your script. Below is an example to check for C:\Windows folder set objDRV = CreateObj… Read More

0 comments:

Post a Comment