Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileDateTime over a network

Status
Not open for further replies.

AndyGroom

Programmer
May 23, 2001
972
GB
Hi,

First; FileDateTime - does it return the Date created or Date modified, the VB help says it's either, which isn't much help at all!

Second; if I use GetTempFile to create an empty temporary file on my C drive, then use VB's FileCopy statement to copy a file from a Server onto my C drive, naming the file as the name given by GetTempFile - will the file have the same date (returned by FileDateTime) as the file on the server, or will it have the date and time of the Temp file?

- Andy.
 
If you are using SQL server you can get the date and time returned from the server - the SQL code is:

"SELECT GETDATE() AS a_NOW"

Hope it helps....

 

FileDateTime will return the date created if the file has not been modified since its creation, else it returns the last modified time. If you want more information you could lookup the GetFileTime API or you could goto MS and do a search on dsofile.dll and you will get the dll and an example project that will allow you to return information about the file including creation and modification.

Now for your second question.

The answer is it will have the time of the origional file since you will be overwriting the temp file.

I hope this helps

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top