Change file -> change timestamp of file 
Author Message
 Change file -> change timestamp of file

Hello,

I have cache problems in a network envirnment: other PC's don't see changes
because the file size and the timestamp doesn't change.

A monitor program opens a file and changes it (on append, sothe file size
doesn't change).
When I change a few bytes, the file timestamp doesn't change.

Is there a function to update the file timestamp without close-open the
file?



Sat, 30 Nov 2002 03:00:00 GMT  
 Change file -> change timestamp of file

Quote:

> Hello,

> I have cache problems in a network envirnment: other PC's don't see changes
> because the file size and the timestamp doesn't change.

> A monitor program opens a file and changes it (on append, sothe file size
> doesn't change).
> When I change a few bytes, the file timestamp doesn't change.

> Is there a function to update the file timestamp without close-open the
> file?

This off-topic.

I'll assume your Operating System is UNIX. If so you can change the
files timestamp with the 'touch' command.

If that don't help I suggest you ask in a newsgroup which is
appropriate for your OS.

--

+---------------------------------------------

Re graphics: A picture is worth 10K words -- but only those to
describe the picture. Hardly any sets of 10K words can be adequately
described with pictures.

--Alan J. Perlis



Sat, 30 Nov 2002 03:00:00 GMT  
 Change file -> change timestamp of file

Quote:
> I'll assume your Operating System is UNIX. If so you can change the
> files timestamp with the 'touch' command.

I'm using BorlandC under DOS. The function 'setftime' sets date and time of
the file, but you have to close the file afterwards. So I'm looking for the
'touch' functionality in a dos program.


Sat, 30 Nov 2002 03:00:00 GMT  
 Change file -> change timestamp of file
Philippe Requil a crit dans le message ...

Quote:
>Hello,

>I have cache problems in a network envirnment: other PC's don't see changes
>because the file size and the timestamp doesn't change.

>A monitor program opens a file and changes it (on append, sothe file size
>doesn't change).
>When I change a few bytes, the file timestamp doesn't change.

Close the file, and the time stamp will be automagically updated.

Quote:
>Is there a function to update the file timestamp without close-open the
>file?

No. The timestamp is an OS feature. The C language is not involved.
--
-hs-
CLC-FAQ: http://www.eskimo.com/~scs/C-faq/top.html
ISO-C Library: http://www.dinkum.com/htm_cl
"Learn to use your web search engine.  Someday it may save your life.
 Always keep your web search engine clean, dry, and serviceable."
--Dann Corbit CLC


Sat, 30 Nov 2002 03:00:00 GMT  
 Change file -> change timestamp of file


Quote:

>> I'll assume your Operating System is UNIX. If so you can change the
>> files timestamp with the 'touch' command.

>I'm using BorlandC under DOS. The function 'setftime' sets date and time of
>the file, but you have to close the file afterwards. So I'm looking for the
>'touch' functionality in a dos program.

Repost your off-topic question to comp.os.msdos.programmer as it has little
to do with C.


Sat, 30 Nov 2002 03:00:00 GMT  
 Change file -> change timestamp of file
Philippe Requil a crit dans le message

Quote:

>I'm using BorlandC under DOS. The function 'setftime' sets date and time of
>the file, but you have to close the file afterwards. So I'm looking for the
>'touch' functionality in a dos program.

touch.com is a part of the BC distribution.

system("touch <file name>");

(The file must be closed)

<ot>
I am am afraid that you can't change the timestamp of an opened file for
obvious security reasons. In your case, you should have the MS-DOS share
utility launched, to protect your file against multiple access... MS-DOS is
not naturally multi-user.
</ot>
--
-hs-
CLC-FAQ: http://www.eskimo.com/~scs/C-faq/top.html
ISO-C Library: http://www.dinkum.com/htm_cl
"Learn to use your web search engine.  Someday it may save your life.
 Always keep your web search engine clean, dry, and serviceable."
--Dann Corbit CLC



Sat, 30 Nov 2002 03:00:00 GMT  
 Change file -> change timestamp of file


Quote:
><ot>
>I am am afraid that you can't change the timestamp of an opened file for
>obvious security reasons. In your case, you should have the MS-DOS share
>utility launched, to protect your file against multiple access... MS-DOS is
>not naturally multi-user.

DOS is not natural, period. 16-bit seg:off crap, mumble, rumble, mumble...
Quote:
></ot>



Sat, 30 Nov 2002 03:00:00 GMT  
 Change file -> change timestamp of file

Quote:


>>> I'll assume your Operating System is UNIX. If so you can change the
>>> files timestamp with the 'touch' command.

>>I'm using BorlandC under DOS. The function 'setftime' sets date and time of
>>the file, but you have to close the file afterwards. So I'm looking for the
>>'touch' functionality in a dos program.

>Repost your off-topic question to comp.os.msdos.programmer as it has little
>to do with C.

And don't forget to go away! :)

--
#include <extra/grumpy.h>



Sat, 30 Nov 2002 03:00:00 GMT  
 Change file -> change timestamp of file

Quote:

>And don't forget to go away! :)

>--
>#include <extra/grumpy.h>

Do we have a new leader for the Campaign For Grumpiness Where
Grumpiness Is Due?  Where do I sign up?

dave

--

"And it came to pass that in the hands of the ignorant, the words of the
Bible were used to beat plowshares into swords."     --Alan Wilson Watts



Sat, 30 Nov 2002 03:00:00 GMT  
 Change file -> change timestamp of file


Quote:
>Hello,

>I have cache problems in a network envirnment: other PC's don't see changes
>because the file size and the timestamp doesn't change.

>A monitor program opens a file and changes it (on append, sothe file size
>doesn't change).
>When I change a few bytes, the file timestamp doesn't change.

>Is there a function to update the file timestamp without close-open the
>file?

Unfortunately no, C has no support at all for file timestamps. Your
particular OS/compiler will probably provide extensions to allow this
but you will have to check you compiler's documentation or a newsgroup
relating to your particular OS/compiler for the specific details.

--
-----------------------------------------


-----------------------------------------



Sat, 30 Nov 2002 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Changing a file timestamp, HOW?

2. Change File status change time

3. Can't Read File Unless I Change File Name

4. Change Default File Type to Source File?

5. Change Default File Type to Source File?

6. Change file index filter of the standard file open/save dialog

7. changing the default file extension in the file open dialog box

8. Changing file types in File open dialog

9. changing timestamp in linux

10. Catching File->Open and File->Close

11. File Format conversion, ascii freeform -->.csv <-->.wk1<-->dbf<-->?HELP

12. finding file creation timestamp

 

 
Powered by phpBB® Forum Software