Link to home
Create AccountLog in
Avatar of VitaminD
VitaminDFlag for United States of America

asked on

Visual Basic Script Task Not Working Correctly

I am new to visual Basic and am having trouble getting this to work propery
All I am trying to do is check to sse if an excel file with the extension .xls exists at this path here \\customer100\c$\LicenseProd\BrokerFeed\ and if a .xls file exists then return success else return failure  - I am doing this script task in Microsoft visual studio 2005


      Public Sub Main()


        Dim filecount As Integer

        filecount = System.IO.Directory.GetFiles("\\\\customer100\c$\LicenseProd\BrokerFeed\\", "*.xls").Length;
       


        Dts.TaskResult = Dts.Results.Success
      End Sub

End Class
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

And what is happening when you run the code?
ASKER CERTIFIED SOLUTION
Avatar of Member_2_861731
Member_2_861731
Flag of Canada image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
If you're using Visual Basic, the syntax would be:

Dts.Variables("User::Variable_Name").Value

Sorry.