?
Solved

File attributes in VB.NET

Posted on 2005-03-14
10
Medium Priority
?
193 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
10 Comments
 
LVL 11

Expert Comment

by:saleek
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:saleek
ID: 13536759
That is weird - if that is constant, then perhaps you are better off using that property!
0
Technology Partners: 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

762 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