?
Solved

File attributes in VB.NET

Posted on 2005-03-14
10
Medium Priority
?
196 Views
Last Modified: 2010-04-23
I use this:

File.GetCreationTime

To see what the file creation date and time is. But I have copied this file to another directory and ran the File.GetCreationTime against it, it shows that date and time it was copied to the new folder.

I need to see the original creation date and time. In other words, when you right-click on the file and see the properties, the "Modified date" shows you the orignal date and time that file was created.

Any ideas on how to show this date and time in VB.NET?

Hope I made sense.
0
Comment
Question by:cjinsocal581
  • 5
  • 3
  • 2
10 Comments
 
LVL 11

Expert Comment

by:Ramesh Srinivas
ID: 13536664
If i understand correctly, you are copying a file and then attempting to read its CREATION DATE??

When a file is copied, it is *created* again and thus has a new creation date. You cannot then access the original date (of the source file from which the copy was made) as far as I am aware.

0
 
LVL 6

Author Comment

by:cjinsocal581
ID: 13536694
What is weird is that if you view the properties of the copied file, it shows the orignial date in the Modified area.
0
 
LVL 11

Expert Comment

by:Ramesh Srinivas
ID: 13536759
That is weird - if that is constant, then perhaps you are better off using that property!
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Author Comment

by:cjinsocal581
ID: 13536799
But I do not see it as a selection in the IntelliSense
0
 
LVL 8

Accepted Solution

by:
bman9111 earned 2000 total points
ID: 13536855
Dim fs As IO.File
  fs.GetLastWriteTime(filepathand name)

this will show u the lasttime the file was writting to.

When u right click on the file are u talking about the modified time right??
0
 
LVL 6

Author Comment

by:cjinsocal581
ID: 13536901
Yes.
0
 
LVL 8

Expert Comment

by:bman9111
ID: 13536954
is the code I posting working for u
0
 
LVL 6

Author Comment

by:cjinsocal581
ID: 13536970
chekcing, be back in a few
0
 
LVL 8

Expert Comment

by:bman9111
ID: 13536994
ok
0
 
LVL 6

Author Comment

by:cjinsocal581
ID: 13537028
Worked.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses

612 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