Hi everyone,
Anyone knows how to extract a file creation date? Kindly assist me.
File Creation Date
Moderator: Rathinagiri
- karweru
- Posts: 220
- Joined: Fri Aug 01, 2008 1:51 pm
- DBs Used: DBF,mysql,mariadb,postgresql,sqlite,odbc
- Contact:
File Creation Date
Kind regards,
Gilbert.
Gilbert.
Re: File Creation Date
Hello Kaweru:
This exists in Harbour and is:
? FILEDATE("C:\TEXT\TEXT.TXT") // The date
Show the date of a particular file.
Hope this helps.
Saludos
Walter
This exists in Harbour and is:
? FILEDATE("C:\TEXT\TEXT.TXT") // The date
Show the date of a particular file.
Hope this helps.
Saludos
Walter
Nada se pierde. Todo se transforma. (Lavoussier)
Nothing is lost. Everything changes.
Nothing is lost. Everything changes.
- karweru
- Posts: 220
- Joined: Fri Aug 01, 2008 1:51 pm
- DBs Used: DBF,mysql,mariadb,postgresql,sqlite,odbc
- Contact:
Re: File Creation Date
Thanks Walter. The function however seems to return the date the file was last changed, not created.
Kind regards,
Gilbert.
Gilbert.
- Rathinagiri
- Posts: 5482
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: File Creation Date
I think we have to use Win32 API function calls for this.
http://support.microsoft.com/kb/188977
This article (for FoxPro) may help.
http://support.microsoft.com/kb/188977
This article (for FoxPro) may help.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: File Creation Date
Have you tried the function FileStats() from harbour contrib library xHbkarweru wrote:Thanks Walter. The function however seems to return the date the file was last changed, not created.
Code: Select all
PROCEDURE ShowStats( cFile )
LOCAL cAttrib, nSize, dCDate, nCTime, dMDate, nMTime
LOCAL cColor
IF FileStats( cFile, @cAttrib, @nSize, @dCDate, @nCTime, @dMDate, @nMTime )
@10,2 SAY "File name: " + cFile
@11,2 SAY "Attributes: '" + cAttrib + "'"
@12,2 SAY "File size: " + Alltrim( Str( nSize ) )
@13,2 SAY "Created: " + DtoC( dCDate ) + " " + TimeOfDay( nCTime )
@14,2 SAY "Modified: " + DtoC( dMDate ) + " " + TimeOfDay( nMTime )
ELSE
cColor = SetColor( "r+/b" )
@10,2 SAY "NOT FOUND: " + cFile
SetColor( cColor )
ENDIF
RETURNKind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- Rathinagiri
- Posts: 5482
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: File Creation Date
Thanks Grigory. 
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- danielmaximiliano
- Posts: 2763
- Joined: Fri Apr 09, 2010 4:53 pm
- DBs Used: DBF
- Location: Argentina
- Contact:
Re: File Creation Date
"Ohh, quien podra salvarme"
Yoooo el chapulin colorado!!!
Grigory, gracias por el dato, siempre contamos con su ayuda.
Translata Google:
"Ohh, who can be saved"
I´the chapulin colorado!!!
Grigory, thanks for the tip, always have your help.
Yoooo el chapulin colorado!!!
Grigory, gracias por el dato, siempre contamos con su ayuda.
Translata Google:
"Ohh, who can be saved"
I´the chapulin colorado!!!
Grigory, thanks for the tip, always have your help.
- Attachments
-
- Chapulin+Colorado[1].jpg (14.96 KiB) Viewed 4954 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace