|
-
Oct 20th, 2000, 07:40 AM
#1
Thread Starter
Member
is there an api that give you the oppurtunity to get info of a specific file like (File size,Date-time created,Date-time last modidied,etc....)
-
Oct 20th, 2000, 08:19 AM
#2
Frenzied Member
Add the Microsoft Scripting Runtime DLL to your project (go to PROJECT / REFERENCES and find it)
Then;
Code:
Dim FSO as New FileSystemObject
Dim MyFile as File
Set MyFile=FSO.GetFile("[filename]")
You can then use;
MyFile.DateCreated for the creation date.
MyFile.DateLastAccessed for the last access date.
MyFile.DateLastModified for the modified date.
MyFile.Size for the size of the file
MyFile.Attributes to get the attributes of the file - check out the help file for more info.
and much more. The MS Scripting Runtime object is very useful in any program that needs to know things about the file system.
'Buzby'
Visual Basic Developer
"I'm moving to Theory. Everything works there."
-
Oct 20th, 2000, 09:46 AM
#3
Thread Starter
Member
thanxs just another thing
for the attributes , they give you a number is there a way to get like read or something else
-
Oct 20th, 2000, 09:50 AM
#4
Frenzied Member
Here you go:
0 - normal
1 - read only
2 - hidden
4 - system
8 - volume
16 - directory
32- archive
64 - alias
128 - compress
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
|