I'm trying to determine the file size. Can anyone push me in the right direction? This is from a DTS Package.
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Option Explicit
Function Main()
Dim objFSO
Dim objFolder
Dim iDate
Dim iFile
Main = DTSTaskExecResult_Failure
iDate = "0807"
DTSGlobalVariables("iFileName").Value = ""
iFile = "\\tamlrpcapp2\volume1$\AMLOPSRPT\MOBE\PendNI\GA" & iDate & "P.dat"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(iFile) Then
Set objFolder = objFSO.GetFile(iFile)
Else
Exit Function
End If
If objFSO.FileSize(iFile) > 0 Then
DTSGlobalVariables("iFileName").Value = iFile
Else
Main = DTSTaskExecResult_Success
End If
Main = DTSTaskExecResult_Success
End Function
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Option Explicit
Function Main()
Dim objFSO
Dim objFolder
Dim iDate
Dim iFile
Main = DTSTaskExecResult_Failure
iDate = "0807"
DTSGlobalVariables("iFileName").Value = ""
iFile = "\\tamlrpcapp2\volume1$\AMLOPSRPT\MOBE\PendNI\GA" & iDate & "P.dat"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(iFile) Then
Set objFolder = objFSO.GetFile(iFile)
Else
Exit Function
End If
If objFSO.FileSize(iFile) > 0 Then
DTSGlobalVariables("iFileName").Value = iFile
Else
Main = DTSTaskExecResult_Success
End If
Main = DTSTaskExecResult_Success
End Function