Got it working, here is the VB script
Public Sub Main()
' GET THE FILE "LOCATION\NAME.ext" & WRITE IT TO THE 'FilePath' VARIABLE.
Dim File_Location As String = CType(Dts.Variables("User::FilePath").Value, String)
' DEFINE A DATESTAMP FOR FILE UPDATE DATE &...
The .Length property returns the correct size when the Dim object is declared as Byte only.
Dim File_Size As Byte()
File_Size = My.Computer.FileSystem.ReadAllBytes(File_Location)
MsgBox("File Size: " & File_Size.Length)
The File_Size.Length needs to be passed into a variable where I can...
I forgot to add the FileSize variable in the ReadWriteVariables in Script Task Editor. Now I'm working on getting the expression built. But it looks like the .Length property doesn't give me the actual size on disk.
Public Sub Main()
' GET THE FILE "LOCATION\NAME.ext" & WRITE IT TO...
I've created a script task that checks whether a flat file exists before the data flow task is executed and that the file was last updated today, but I'm having some trouble with checking for the file size. After making sure that the file exists I would like to make sure that the file is larger...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.