Check for file in folder

L

Les Stout

Hi all, i need to check a folder in a network drive "Q" to see if a file
exists, if it does, when was it created if older than 7 days give a
message are you sure you want to use this file, if younger than 7 days
open.

Some help with code would be appreciated.

Thanks in advance for any help..

Les Stout
 
D

dolivastro

Use the FileDateTime (<file>) function:

if (now() - FileDateTime (<file>)) > 7) then
call MsgBox ("Your message")
else
[code...]
end if

Hope this helps,
Dom
 

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