reading files from a directory

  • Thread starter sreenivasan alakappan
  • Start date
S

sreenivasan alakappan

Hello,
I need some help to do this following requirement.

I need to serach for *.txt files from a particular windows directory,
read the contents of the file. After doing so, then I need to delete
this file and wait until anohter *.txt file is written into this
directory by somebody else.

So, the core requirement is whenever there is a *.txt, i need to read
and process the file after which i need to delete to avoid processing
it again. I think I need to use threads in this and polling. But, I am
not very sure. Any siggestions will be useful.

Thanks,
Sreeni.
 
C

CBFalconer

sreenivasan said:
I need some help to do this following requirement.

I need to serach for *.txt files from a particular windows
directory, read the contents of the file. After doing so,
then I need to delete this file and wait until anohter *.txt
file is written into this directory by somebody else.

The following should help, if carefully read:
 
M

Malcolm

sreenivasan alakappan said:
I need some help to do this following requirement.

I need to serach for *.txt files from a particular windows directory,
read the contents of the file. After doing so, then I need to delete
this file and wait until anohter *.txt file is written into this
directory by somebody else.
You need platform specific extensions to do this. ANSI C doesn't even define
any directory functions, let alone anything for polling.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top