title: fopen for reading/writing multiple files in a folder C
body: <p>I have a question about how to use <code>fopen()</code> to read/write multiple files of one folder. I have 100 text files in a folder and I want to use a loop to open all the files (one by one) and write something in them. For example something like this:</p>
  
  <pre><code>for(i = 0; i &lt; 100; i++)
  {
    f = fopen("files","a");
    fwrite("hello");
    fclose(f);
  }
  </code></pre>
  
  <p>So for example if i have 100 txt files in the folder "C:\Users\Desktop\examples\txts" I want to open all of them and write for example the same word "hello" to all of them.</p>
  
  <p>If I use it like: "C:\Users\Desktop\examples\txts*.txt" (with the star: *) it doesn't work. Any idas?</p>