Форум: "Основная";
Текущий архив: 2003.02.24;
Скачать: [xml.tar.bz2];
ВнизФайлы Найти похожие ветки
← →
K7 (2003-02-11 20:44) [0]Есть файл ....
надо изменить дату и время его создания
как это зделать.
← →
К7 (2003-02-11 21:25) [1]Может кто нибудь поделится своими мыслями и знаниями ???????
← →
Романов Р.В. (2003-02-11 21:39) [2]SetFileTime
← →
Андрей Сенченко (2003-02-11 21:53) [3]Вообще то в таких случаях Help охотно делится и тем и другим.
Алгоритм такой :
1. Жмем F1, Выбираем "разделы".
2. Набираем слово files
3. Обнаруживаем files, date-time routines, заходим поглядеть
видим :
The FileAge, FileGetDate, and FileSetDate routines operate on operating system date-time values. FileAge returns the date-and-time stamp of a file, or -1 if the file does not exist. FileSetDate sets the date-and-time stamp for a specified file, and returns zero on success or an error code on failure. FileGetDate returns a date-and-time stamp for the specified file or -1 if the handle is invalid.
As with most of the file manipulating routines, FileAge uses a string filename. FileGetDate and FileSetDate, however, take a Handle type as a parameter. To get access to a Windows file Handle either
Call the Windows API CreateFile function. CreateFile is a 32-bit only function that creates or opens a file and returns a Handle that can be used to access the file.
Instantiate TFileStream to create or open a file. Then use the Handle property as you would a Windows’ file Handle. See Using file streams for more information.
4. Вешаем на кнопочку например FileSetDate, ставим скобку и смотрим : что нас просят ввести ... АГА .. имя файла и новые дату-время
5. Собственно все. Как текущие дату-время в "естественном формате" перевести в TDateTime надеюсь найдете
← →
К7 (2003-02-13 00:31) [4]SetFileTime
Выдает ошибку мол тип должен
быть PFileTime объясните по-
жалуйста с ней работать.
Или реальный пример.
Я ведь только начинаю познавать
мир програмирования и делфи поэ-
тому прошу ответить намой вопрос,
разобратся самому не получается.
← →
Palladin (2003-02-13 01:23) [5]FileSetDate(<имя файла>,DateTimeToFileDate(EncodeDate(<год>,<месяц>,<день>)));
Страницы: 1 вся ветка
Форум: "Основная";
Текущий архив: 2003.02.24;
Скачать: [xml.tar.bz2];
Память: 0.45 MB
Время: 0.015 c