Looking at properties of a file

M

Mark

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
 
M

Marshall Barton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top