PRMiller2
Technical User
- Jul 30, 2010
- 123
I currently have a form that runs a timer event every x milliseconds. It checks to see if a file exists in a certain directory and returns a value (1) if one does exist:
I'm trying to build this out so that the program detects whether or not a file has been dropped into this directory and then acts on it, based on some logic. It is possible that more than one file will be dropped in at a time, but it does not matter in what order the files are processed.
I would like my module to retrieve the name of the next file to work and parse it's prefix, checking against a lookup table or code to determine what process to take. For example:
My question is, how to I retrieve the name of a file once FileExists is true?
Thanks,
Paul
Code:
If FileExists("C:\Mypath\Queue\*.*") = True Then
...
I'm trying to build this out so that the program detects whether or not a file has been dropped into this directory and then acts on it, based on some logic. It is possible that more than one file will be dropped in at a time, but it does not matter in what order the files are processed.
I would like my module to retrieve the name of the next file to work and parse it's prefix, checking against a lookup table or code to determine what process to take. For example:
Code:
Dim strFileName as String
...
Select Case Left(strFileName, 3)
Case "ONE"
DoThis
Case "TWO"
DoThat
End Select
My question is, how to I retrieve the name of a file once FileExists is true?
Thanks,
Paul