Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.05.16;
Скачать: CL | DM;

Вниз

Как определить дату создания/изменения файла?   Найти похожие ветки 

 
Serd_hhc   (2002-03-16 10:03) [0]

Уважаемые мастера,
Мне надобно узнать дату последнего изменения файла, сравнить
с другой датой, а потом, в зависимости от результата, выполнить
какое-либо действие.

Заранее спасибо.

П.С.
Желательно помочь примером....


 
MBo ©   (2002-03-16 11:08) [1]

FindFirst, TSearchRec.findData,


 
alexproger ©   (2002-03-16 11:21) [2]

Вопрос более подходит в категорию - Общие вопросы ;)))
Существует два ответа:
имя файла известно - function FileGetDate(Handle: Integer): Integer; Handle получаешь через FileOpen

Имя файла неизвестно - воспользуйся советом MBo


 
VuDZ ©   (2002-03-16 12:23) [3]

раз уж это форум по winAPI:
GetFileTime
The GetFileTime function retrieves the date and time that a file was created, last accessed, and last modified.

BOOL GetFileTime(
HANDLE hFile, // handle to file
LPFILETIME lpCreationTime, // creation time
LPFILETIME lpLastAccessTime, // last access time
LPFILETIME lpLastWriteTime // last write time
);

Parameters
hFile
[in] Handle to the files for which to get dates and times. The file handle must have been created with GENERIC_READ access to the file.
lpCreationTime
[out] Pointer to a FILETIME structure to receive the date and time the file was created. This parameter can be NULL if the application does not require this information.
lpLastAccessTime
[out] Pointer to a FILETIME structure to receive the date and time the file was last accessed. The last access time includes the last time the file was written to, read from, or, in the case of executable files, run. This parameter can be NULL if the application does not require this information.
lpLastWriteTime
[out] Pointer to a FILETIME structure to receive the date and time the file was last written to. This parameter can be NULL if the application does not require this information.



Страницы: 1 вся ветка

Текущий архив: 2002.05.16;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.012 c
4-50164
Velocity
2002-03-15 07:10
2002.05.16
PBS_SMOOTH - как использовать сию мессагу?


14-50084
Black_Angel
2002-04-05 09:33
2002.05.16
Тут про вингейт говорили, а у меня вопрос по винроуту (v4.1)...


6-50071
scam
2002-03-05 01:45
2002.05.16
Написание plugin ов для Internet Explorer.


14-50104
Vulsim
2002-04-07 07:20
2002.05.16
Есть у кого алгоритмы криптования или dll с ними


1-49937
ko@ndrew
2002-05-03 22:11
2002.05.16
DirectPlay8