473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Retrieving File Modified Date

13
Hi All,

I'm using VB.net 2003 Standard Edition, and I'm trying to retrieve the file modified date. Sounds painfully simple. Yup. But ... I cannot, for the life of me, figure it out. After numerous Google searches with no joy, I decided either the answer was so simple nobody ever asked the question, or ... you needed to be on NASA's payroll to comprehend the answer :)

I've created a System.IO.FileInfo object, and have collected info from the three methods: CreationTime, LastAccessTime, and LastWriteTime, but they aren't giving me the same data as XP Windows Explorer is.

In Explorer, there is a Date Modified field (currently reading 2008 on the file in question), but using the FileInfo methods they return 2007, 2009, 2009.

Is there another IO object I can use to get this 'modified' date? Or, does anyone know the API routine that will yield the same results?

Many Thanks,
Apr 5 '09 #1
1 12010
Enij
13
For some reason (probably one of those 'problem between keyboard and chair' errors), using FileInfo.LastWriteTime is yielding the correct results, displaying exactly what Explorer does as its 'Date Modified' field.

Problem solved. I think I was the problem ...
Apr 5 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: pythos | last post by:
How do you change a file's last-modified date and timestamp in Python?
0
by: Tao | last post by:
I'm using the following code in my service to retrieve the modified date of a web page. public DateTime GetUrlSourceLastModified(string sUri) { if(!sUri.ToLower().StartsWith("http://")) sUri =...
11
by: Dennis Marks | last post by:
There seems to be a major program with the automatic display of the last modified date. Using the javascript "document.lastModified" sometimes returns the correct date and sometimes 1 Jan 1970...
7
by: laredotornado | last post by:
Hello, Does anyone know how (or if) I can figure out the last time a web page was last modified if my only access to it is via HTTP (a web browser). Right now, I'm looking at "Page Info" options....
9
by: AP | last post by:
Is there anyway to determine what the modified or create date is for a file? In my example I am uploading a text file using the following to select the filename: GetOpenFileName Lib "COMDLG32.DLL"....
6
by: Mark | last post by:
Using VS.NET 2003 I have one asp.net application where the modified date never changes. I have other solutions (asp.net/desktop) where the modified date does change. This has been going on for...
11
by: strychtur | last post by:
Hi all, I have a vbscript that renames msg files to Sender - Subject. What I am looking to do is change the modified date of the msg file to be the received date of the email. The thing is I could...
1
by: Bookbug | last post by:
On windows XP, I know I can get the modified date of a file by using the stat function. Is there a way to set this modified date?
4
code green
by: code green | last post by:
Within a stored procedure I am creating a table from an Excel spreadsheet /*Create tmp table from XLS*/ SELECT * INTO tmp_cons FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.