I want to remove a particular substring from all the file names in a directory:
— like ‘XYZ.com’ from ‘Futurama s1e20 – [XYZ.com].avi’ —
So basically I need to provide the method with a desired substring, and it has to loop through all file names and compare.
I cant figure out how to loop through all files in a folder using C.
You may use
FTS(3)to loop through all files in a folder using C:http://keramida.wordpress.com/2009/07/05/fts3-or-avoiding-to-reinvent-the-wheel/