Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Check whether the directory is empty or not on network drive

$
0
0

need to check whether the folder is having any file or is empty.

using this code

Public Sub Main()
If File.Exists("User::vFolderToDelete") = True Then
' Dts.Variables("User::vFileExistCheck").Value = "Yes"
MsgBox(" found")
Else
'Dts.Variables("User::vFileExistCheck").Value = "No"
MsgBox(" not found")
End If
'Dts.TaskResult = Dts.Results.Success
End Sub


it is simple but somehow i am not able to get the correct result.

it always prints the message as "Not found" though the network shared folder is

having file.

any solution please..


Regards, Chirag Patel (ETL Engineer)


Viewing all articles
Browse latest Browse all 24688

Trending Articles