How to set file date/time? 
Author Message
 How to set file date/time?

Hi,

Does anyone know of a way to set a given file's date/time/size?
SDK includes functions to get date/time/size but I haven't been
able to find any function that would set the same.

Please e-mail (if possible) any suggestions.

Thanks in advance.
Bogdan.



Sat, 03 Jul 1999 03:00:00 GMT  
 How to set file date/time?



Quote:
> Hi,

> Does anyone know of a way to set a given file's date/time/size?
> SDK includes functions to get date/time/size but I haven't been
> able to find any function that would set the same.

CFile::SetStatus()

--
Pete Albano


http://www.greatbasin.com/~Albano



Sat, 03 Jul 1999 03:00:00 GMT  
 How to set file date/time?



Quote:


> > Hi,

> > Does anyone know of a way to set a given file's date/time/size?
> > SDK includes functions to get date/time/size but I haven't been
> > able to find any function that would set the same.

> CFile::SetStatus()

or use the SetFileTime function of the Win32 SDK

--
Benoit d'Oncieu, Senior Developer
ADWAYS 'The net for advertising markets'
6 rue Godefroy, 92800 PUTEAUX, FRANCE
Tel: (33-1) 41 97 56 82
Fax (33-1) 41 97 56 57

Quote:

> --
> Pete Albano


> http://www.greatbasin.com/~Albano



Sun, 04 Jul 1999 03:00:00 GMT  
 How to set file date/time?

Quote:
>Does anyone know of a way to set a given file's date/time/size?
>SDK includes functions to get date/time/size but I haven't been
>able to find any function that would set the same.

How about SetFileTime() to set the time & date?

As for setting a file size, I'd guess if you want to truncate a file
you could open the file, seek to the required position, use
SetEndOfFile, and close it.

Dave
----
Address is altered to discourage junk mail.
Remove ".---" for the real address.



Sun, 04 Jul 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Touching a file (set to current time and date)

2. QUESTION: How to set the time and date for a file's creation or modification

3. Set Date in Date Time Picker

4. set file time & date

5. set date/time/time zone dialog

6. C time/date to Visual Basic time/date

7. Date Time Picker - Date AND Time

8. Set Date and Time with VC++5 **URGENT**

9. Setting date/time

10. Source File Date/Time Info in Obj Files?

11. Getting or Setting regional settings for date/time format from an application

12. Setting date & time

 

 
Powered by phpBB® Forum Software