Solved

Getting File Creation Date

Posted on 2002-03-21
3
169 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

680 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