Forum Discussion
mesg2anil
14 years agoRegular Contributor
Hi Irina,
Long time... How are you doing?
Thank you for replying!!
I'm coding in VB and the code you sent me is in Jscript... :) I tried to convert it into VB, but getting stuck in between... below is the code
Long time... How are you doing?
Thank you for replying!!
I'm coding in VB and the code you sent me is in Jscript... :) I tried to convert it into VB, but getting stuck in between... below is the code
Function LastModifiedFile
FolderName = "E:\Anil-Backup\Test Complete\Projects_Old\In4Suite Project\Exported Reports\"
Set FolderInfo = aqFileSystem.GetFolderInfo(FolderName)
Num = FolderInfo.Files.Count
Log.Message "The folder contains " &Num &" files."
Dim NewArray()
For i = 0 to Num
FileDate = FolderInfo.Files.Item(i).DateLastModified
a = NewArray() 'AT THIS LINE I'M GETTING "SUBSCRIPT OUT OF RANGE: 'NewArray()"
a(i) = FileDate
Log.Message NewArray(i)
Next
'You can obtain the file name using the following code
Log.Message FolderInfo.Files.Item(i).Path
End Function
Any suggestions on this please??