Used LastWriteTime Instead Of CreationTime?

Mar 2, 2010

The solution was simple, I used LastWriteTime instead of CreationTime CreationTime will = time that file was placed on that drive LatWriteTime will = Last time that file was written too, thus the actual original creation time (unless file has been modified of course, which in my case [wmv files] is not going to happen)

View 1 Replies


ADVERTISEMENT

CreateTime And .LastWriteTime Are WAY Off?

May 29, 2010

When I look at a file on the server, Windows 7 explorer reports a Date Created date of 5/20/2010 10:49 AM, and a Date Modified date of 5/20/2010 10:50 AM. This is what I expect and what I believe to be true.

However, running my VB.NET code, when I do My.Computer.FileSystem.GetFileInfo(filespec).CreateTime, that value is something completely different: 12/31/1600 6:00:00 PM, and My.Computer.FileSystem.GetFileInfo(filespec).LastWriteTime is set to that same value (12/31/1600 6:00:00 PM).What am I doing wrong? I need to get the values associated with "Date Created" and "Date Modified" as displayed in Windows Explorer.

View 3 Replies

.net - FileInfoComparer Not Sorting Correctly (on LastWriteTime)

Dec 22, 2011

I have a simple (ASP.NET) web page that lists files of a particular type in a folder and renders them in a ListView.

I've tried to sort them by descending LastWriteTime, that is, in reverse date order. However, although the sort process does change the order of the array, it doesn't sort it correctly. For example, one item with a LastWriteTime of #6/3/2011 12:00:00 is top of the list, but another item with a LastWriteTime of #12/16/2011 12:00:00 is halfway down the list after sorting.

Code:

Dim dirInfo As New DirectoryInfo(Server.MapPath(AppSettings.Item("ContentDir")))
Dim FileArrayList As New ArrayList(dirInfo.GetFiles("*.msg", SearchOption.TopDirectoryOnly))

[Code]....

View 2 Replies

File LastWriteTime And String Functions

Nov 2, 2009

1. I copy file xxx.yy from my C: drive to drive F: , which is a USB memory stick, and then execute the following code to get the date from both files:

[Code]...

View 12 Replies

FileInfo.LastWriteTime And Citrix Wrong Value Returned?

Nov 29, 2010

I have an application written using VB.Net, framework 3.5.In the application I read LastWriteTime and CreationTime values for a file saved in file system. In general,the code works fine except one case when the application is started using Citrix environment. In this case the returned value for bithproperties is January 1, 1601.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved