Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 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
3-75772
freeek10
2003-02-05 21:15
2003.02.24
db->dbf


1-75995
Chlavik
2003-02-11 01:04
2003.02.24
ListBox


7-76204
sniknik
2002-12-24 20:37
2003.02.24
Нормальное завершение системы.


4-76231
pkm1
2003-01-11 20:30
2003.02.24
Папка


8-76041
Кен
2002-11-09 02:31
2003.02.24
Как можно через TMediaPlayer проиграть ресурс, без сохранения на





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский