Solved

Getting File Creation Date

Posted on 2002-03-21
3
165 Views
Last Modified: 2010-05-02
I have 4 files that I want to update in my C:\winnt\system32 directory.  The file dates of the old files are 1/20/2000 and the new file dates are 1/20/2002.  There are only 4 files to replace, but I want only replace these files with the new dated files.  How can I test for date on the file?
0
Comment
Question by:mtbuford
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 50 total points
ID: 6886831
you could use fso:

   Set fs = CreateObject("Scripting.FileSystemObject")
   Set f = fs.GetFile("C:\windows\desktop\copy of Calc.doc")
   msgbox f.DateCreated
   msgbox f.DateLastAccessed
   msgbox f.DateLastModified
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 7537326
why the 'C'?
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7545790
Changed grade per request.

mtbuford

If you didn't get enough information feel free to ask the experts any further questions. Take a look at http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp to read more about grading.

** Mindphaser - Community Support Moderator **
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now