Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Structural

A few quick questions: files in folder, and timestamps

This topic is 5773 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

At the moment I''m working on a console for my error and output viewing and I''d love to output the buffer of the console to a file once a while, since the console is lost when the app closes. I''ve been searching google but it can''t find it. Anyway, for this I want to create a new file every time, but it has to be unique. How can I get the contents of the folder so I can quickly see if a file exists or not? Another question is regarding timestamps: How do I get a timestamp in a dd/mm/yy or hh/mm/ss format? TY ______________________________ "A computer is meant to be a big calculator, not a storage device" Struct.m33p.net

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
for Windows it''s

FindFirst

* with the returned handle you can go through the folder by doing FindNext
* don''t use FindClose in WinNT if FindFirst wasn''t successful, could hang up your system

for Dos look into the io.h, there are prototypes like this:
long _RTLENTRY _EXPFUNC _findfirst(char *, struct _finddata_t *);
long _RTLENTRY _EXPFUNC _findnext(long, struct _finddata_t *);
int _RTLENTRY _EXPFUNC _findclose(long);
and so on ...

bye,
andré

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
for Windows it''s

FindFirst

* with the returned handle you can go through the folder by doing FindNext
* don''t use FindClose in WinNT if FindFirst wasn''t successful, could hang up your system

for Dos look into the io.h, there are prototypes like this:
long _RTLENTRY _EXPFUNC _findfirst(char *, struct _finddata_t *);
long _RTLENTRY _EXPFUNC _findnext(long, struct _finddata_t *);
int _RTLENTRY _EXPFUNC _findclose(long);
and so on ...

bye,
andré



was it the legendary André LaMothe?!

.lick

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
well, no i''m just another coder ...

bye,
andré

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!