This function would provide you an idea about how to process files on disk from ASP.NET code. It is a function which is quering some network location to get the number of files processed today.
Thanks
Protected Function GetTotalTransactionsfromBackupLocation() As Integer
Dim objShell = CreateObject("Shell.Application")
Dim objFSO = CreateObject("Scripting.FileSystemObject")
Dim objItem, objFile
-- Set network location you would like to poll
Dim objFolder = objShell.NameSpace("\\servername\location")
Dim colItems = objFolder.Items
Dim NumberOfFilesProcessed = 0
For Each objItem In colItems
objFile = objFSO.GetFile(objItem.Path)
If Day(objItem.ModifyDate) = Day(Today()) Then
NumberOfPDFProcessed = NumberOfPDFProcessed + 1
End If
Next
Return NumberOfFilesProcessed
End Function
No comments:
Post a Comment