Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "WinAPI";
Текущий архив: 2002.05.16;
Скачать: [xml.tar.bz2];

Вниз

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

 
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 вся ветка

Форум: "WinAPI";
Текущий архив: 2002.05.16;
Скачать: [xml.tar.bz2];

Наверх




Память: 0.45 MB
Время: 0.005 c
4-50183
Diemond
2002-03-13 20:30
2002.05.16
Сообщение о завершении работы Windows


1-49913
snoup
2002-04-29 00:15
2002.05.16
Помогите пожалуйста, например я где-то в блокноте или в офисе пиш


14-50135
igorr
2002-03-30 03:21
2002.05.16
Где скачать Delphi 1?


1-50018
KvORubin
2002-05-01 11:17
2002.05.16
RichEdit1 - Как програмно переместить полсу прокрутки вниз ???


1-49915
Windeus
2002-05-03 08:49
2002.05.16
Extension in Savedialog





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский