title: How do I loop through all files in a folder using C?
body: <p>I want to remove a particular substring from all the file names in a directory: </p>
  
  <blockquote>
    <p>-- like 'XYZ.com' from 'Futurama s1e20 - [XYZ.com].avi' --</p>
  </blockquote>
  
  <p>So basically I need to provide the method with a desired substring, and it has to loop through all file names and compare.</p>
  
  <p>I cant figure out how to loop through all files in a folder using C.</p>