1.

Solve : how to retrieve file creation date and how to compare tat date with the s/m dat?

Answer»

hi,

can anyone tell me how to retrieve the file creation date and how to compare that file creation date with that of the s/m date.

it wud be very helpful if some one could help me imm regarding this issue.

thanks.The documentation uses the following notation of date/time of file. (%~t1). Unfortunately it does not specify which date this refers to (creation, written, or accessed). You can pull dates from a directory listing using the relevant switch (/tc=create, /tw=written. /ta=accessed)

What is a s/m date? Sounds like a play date for the kinky crowd! hey hi...

thanks for ur reply..... s/m date is system date........ HOPE ur clear now.... anyhow ll try wat u have told me an get back to u...

thanks.....you can use vbscript/wsh:
an example
Code: [Select]Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("c:\temp\test.bat")
Wscript.Echo "Date created: " & objFile.DateCreated
Wscript.Echo "Date last accessed: " & objFile.DateLastAccessed
Wscript.Echo "Date last MODIFIED: " & objFile.DateLastModified
Wscript.Echo "Drive: " & objFile.Drive
Wscript.Echo "Name: " & objFile.Name
Wscript.Echo "Parent folder: " & objFile.ParentFolder
Wscript.Echo "Path: " & objFile.Path
Wscript.Echo "Short name: " & objFile.ShortName
Wscript.Echo "Short path: " & objFile.ShortPath
Wscript.Echo "Size: " & objFile.Size
Wscript.Echo "Type: " & objFile.Type

save it as a file with .vbs extension. then on command line, type
Code: [Select]c:\> cscript yourfile.vbs
thanks ll try t out!!1 can u excute this scirpt using dos prompt?yes, i have shown it to you. using cscript . pls check my post again.thanks!!!!

can u help me with C++???you may post to the programming section. C++ is a long time ago for me. sorryQuote from: ghostdog74 on April 09, 2007, 03:15:20 AM

("Scripting.FileSystemObject")

Scripting.FileSystemObject-?? A little more about this how it used and properties.



File System Object
Quote
Contains methods and properties that allow you to create, DELETE, gain information about, and GENERALLY manipulate drive, folders, and FILES.
Source: Windows Scripting Technologies (compiled Help file)

For a technical discussion, check out Files and Folders

Note: The FileSystemObject does not handle databases which have their own set of objects.

Good luck.


Discussion

No Comment Found