![]() |
Check for file in folder
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 *** Sent via Developersdex http://www.developersdex.com *** |
Check for file in folder
Use the FileDateTime (<file) function:
if (now() - FileDateTime (<file)) 7) then call MsgBox ("Your message") else [code...] end if Hope this helps, Dom Les Stout wrote: 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 *** Sent via Developersdex http://www.developersdex.com *** |
Check for file in folder
Hi Dom,
done the trick, thanks very much.. Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
All times are GMT +1. The time now is 03:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com