PC Review


Reply
Thread Tools Rate Thread

Check for file in folder

 
 
Les Stout
Guest
Posts: n/a
 
      11th Oct 2006
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 ***
 
Reply With Quote
 
 
 
 
dolivastro@gmail.com
Guest
Posts: n/a
 
      11th Oct 2006
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 ***


 
Reply With Quote
 
Les Stout
Guest
Posts: n/a
 
      11th Oct 2006
Hi Dom,

done the trick, thanks very much..

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check for file in folder Tom Microsoft Access Form Coding 3 14th Feb 2009 12:05 PM
Check for file in folder, if not there, open folder to rename file Don M. Microsoft Excel Programming 9 22nd Oct 2008 07:34 PM
Solution to: Can't create file:.xls. Right click folder you want to create the file in and then click properties on the shortcut menu to check your permissions on this folder Ky_fanatic Microsoft Outlook Discussion 1 8th Dec 2006 06:15 PM
How to check if there is a new file in a folder? Lakesider Microsoft C# .NET 4 3rd Nov 2005 02:40 PM
check if file is in particular folder nikolaosk Microsoft Excel Programming 2 18th Oct 2003 04:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:25 AM.