|
-
Jan 4th, 2010, 02:19 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] File Size..
how can i determine the file size and the date it was last modified..
i need to compare two files and determine which one is the latest and which one is bigger in file size..
compare a.xml to b.xml..
-
Jan 4th, 2010, 04:39 AM
#2
Hyperactive Member
Re: File Size..
Use FileInfo property...
VB.Net Code:
'in method (let say on button click or similar) Dim aFile As New IO.FileInfo aFile = My.Computer.FileSystem.GetFileInfo("test.txt") 'you will probably browse this file name and not like this sample, fixed it in code here... Dim FileSize As Long = aFile.Length MsgBox(FileSize)
-
Jan 4th, 2010, 04:41 AM
#3
Hyperactive Member
Re: File Size..
and for date you can use the same property...
VB.Net Code:
MsgBox("Accessed: " & fileDetail.LastAccessTime)
'or
MsgBox("Modified: " & fileDetail.LastWriteTime)
-
Jan 4th, 2010, 08:07 PM
#4
Thread Starter
Hyperactive Member
-
Jan 5th, 2010, 03:39 AM
#5
Hyperactive Member
Re: File Size..
np...
...please mark this thread resolved.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|