Hi,
The following script im trying to use for checking the file for its date,
the script has to succeed if its current date, else should fail.
but the following one not at all working please help.
Public Sub Main() Dim Fileinfo As FileInfo Fileinfo = New FileInfo(Dts.Variables("User::UserFilePath").Value.ToString()) If Fileinfo.Exists = False Then Dts.TaskResult = ScriptResults.Failure Return End If Dim current As Date = DateTime.Now Dim fileCreateDate As Date = Fileinfo.CreationTime If current.ToShortDateString <> fileCreateDate.ToShortDateString Then Dts.TaskResult = ScriptResults.Failure Else Dts.TaskResult = ScriptResults.Success End If End Sub
please let me know where its going wrong !
Thanks !
--------------------------- Radhai Krish | Golden Age is no more far | --------------------------