timestamp 
Author Message
 timestamp

I am trying to write a "C" program to modify timestamp of a file in
WINDOWS/DOS .

Does anyone know how to do this ? I do not have cygwin or any other
tool to invoke "touch"  command too .

Thanks
prashanth



Sat, 06 Mar 2004 02:37:33 GMT  
 timestamp

Quote:
> I am trying to write a "C" program to modify timestamp of a file in
> WINDOWS/DOS .

> Does anyone know how to do this ? I do not have cygwin or any other
> tool to invoke "touch"  command too .

Well, perhaps somebody in a Windoze Programming group does.

--

"LISP  is worth learning for  the profound enlightenment  experience
you will have when you finally get it; that experience will make you
a better programmer for the rest of your days."   -- Eric S. Raymond



Sat, 06 Mar 2004 12:21:14 GMT  
 timestamp

Nimmagadda) wrote in comp.lang.c:

Quote:
> I am trying to write a "C" program to modify timestamp of a file in
> WINDOWS/DOS .

> Does anyone know how to do this ? I do not have cygwin or any other
> tool to invoke "touch"  command too .

> Thanks
> prashanth

You will need to ask this in a group that supports Windows
programming, your particular compiler, or both.  C has no concept of
directories, file systems, or time stamps, as these are properties of
operating systems, not the language.

Although any conforming compiler for Windows or MS-DOS should provide
the standard library function system() which could be used to invoke a
touch utility.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq



Sat, 06 Mar 2004 12:37:34 GMT  
 timestamp
Microsoft Knowledge Base and My Previous Usage:

Microsoft API calls:

OpenFile() or CreateFile() --> File Handle

SystemTimeToFileTime ()

            |
           V
LocalFileTimeToFileTime()

            |
           V

SetFileTimeWrite()

            |
           V


Quote:
> I am trying to write a "C" program to modify timestamp of a file in
> WINDOWS/DOS .

> Does anyone know how to do this ? I do not have cygwin or any other
> tool to invoke "touch"  command too .

> Thanks
> prashanth



Sat, 06 Mar 2004 14:05:20 GMT  
 timestamp
Microsoft Knowledge Base and My Previous Usage:

Microsoft API calls:

OpenFile() or CreateFile() --> File Handle

SystemTimeToFileTime ()

            |
           V
LocalFileTimeToFileTime()

            |
           V

SetFileTimeWrite()

Brian

Quote:
> I am trying to write a "C" program to modify timestamp of a file in
> WINDOWS/DOS .

> Does anyone know how to do this ? I do not have cygwin or any other
> tool to invoke "touch"  command too .

> Thanks
> prashanth



Sat, 06 Mar 2004 14:06:06 GMT  
 timestamp

Quote:
>I am trying to write a "C" program to modify timestamp of a file in
>WINDOWS/DOS .

Such an operation is the domain of the operating system.
As such, it will require a language or library 'extension',
or possibly third party tools to implement.

The C language was designed to be as platform-independent
as possible, thus such platform-specific operations
are not directly supported by the languages.

Check the documentation of your compiler package, operating
system, and/or newsgroups dedicated to them.  Check www.usenet.org
for locating newsgroups.

Finally, before posting here again, please read
http://www.cs.wustl.edu/~jxh/CLOJ/welcome_to_comp_lang_c.html
and:
http://www.eskimo.com/~scs/C-faq/top.html

It's always a good idea to read a group's 'welcome' message
and/or FAQ document *before* posting.

More information about 'Usenet etiquette' is available
at www.usenet.org

-Mike



Sat, 06 Mar 2004 03:31:08 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. UNIX timestamp

2. Build timestamp

3. a predefined compile-timestamp token?

4. How to maintain TimeStamp consistency across Time Zones?

5. finding file creation timestamp

6. Getting Assembly compilation timestamp

7. Decoding the VMS 64bit timestamp...

8. getting timestamp from time()

9. timestamp

10. can C access timestamps?

11. Can C pick up the timestamp of file

12. Change file -> change timestamp of file

 

 
Powered by phpBB® Forum Software