Looking at properties of a file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

I have a trigger program (access) that monitors a folder. When a file is in
this folder I do some processing with the data then move the file.
My problem is, if the file has no data I would like to not do anything with
it.
Question is how do I look at a files property and see if it's "K"
value(size) is greater then "0"?

MyPath = "c:\data\export\put\*.rcv"
MyName = Dir(MyPath, vbDirectory)

If MyName <> "" Then

Call Shell("c:\data\program\f2mPut.bat")

End If
 
Mark said:
I have a trigger program (access) that monitors a folder. When a file is in
this folder I do some processing with the data then move the file.
My problem is, if the file has no data I would like to not do anything with
it.
Question is how do I look at a files property and see if it's "K"
value(size) is greater then "0"?

MyPath = "c:\data\export\put\*.rcv"
MyName = Dir(MyPath, vbDirectory)

If MyName <> "" Then

Call Shell("c:\data\program\f2mPut.bat")

End If


You can use the FileLen function to see if the file contains
anyting.
 
Back
Top