I want to remove a particular substring from all the file names in a directory:
-- like \'XYZ.com\' from \'Futurama s1e20 - [XYZ.com].avi\' -- >
-- like \'XYZ.com\' from \'Futurama s1e20 - [XYZ.com].avi\' --
Take a look at dirent.h.