Click here to Skip to main content
14,929,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
Function Main()
     Set filestreamOUT = CreateObject("Scripting.FileSystemObject").CreateTextFile(DTSGlobalVariables("gvpathURI").Value + "\" +"Success.txt",true)

     filestreamOUT.WriteLine("Success")
     filestreamOUT.Close()

     Set filestreamOUT = Nothing
     Main = DTSTaskExecResult_Success

 End Function


What I have tried:

VB
Public Sub Main()
     Dim filestreamOUT As Object

     filestreamOUT = CreateObject("Scripting.FileSystemObject").CreateTextFile(Dts.Variables("gvpathURI").Value + "\" + "Success.txt", True)

     filestreamOUT.Write("Success")
     filestreamOUT.Close()

     filestreamOUT = Nothing

     Dts.TaskResult = ScriptResults.Success

End Sub
Posted
Updated 23-Dec-20 5:05am
v2
Comments
F-ES Sitecore 23-Dec-20 10:33am
   
Use the System.IO classes like File etc to create and write to files. Google the documentation for examples.
mounika mouni 24-Dec-20 3:01am
   
I am new to vb.net .can you please explain me how to write using system.IO
CHill60 23-Dec-20 11:05am
   
The best way to see if it needs any changes is to test it.
mounika mouni 24-Dec-20 2:46am
   
This is IN-Active Clients just I need to do changes in coding .We cant test these type of packages .
CHill60 24-Dec-20 18:58pm
   
You can always test code you write

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900