This code was written, which take a directory then look for the files inside. it aims to create binary files for each file found by taking it filename. I want to create these file first so as to write some data inside them later.
However, the code is not running as expected. and the binary file are not created this the issue.
The task is to loop through files like images in the dir the names change the extension then create for each image its own binary file
You're probably using the wrong tool. Use a shell script. In Bash:
<<(find . -type f -name "*.jpg" -o -name "*.png") \
while read line ; do touch ${line%.*}.bin; done
(I don't know how to do this in Windows batch.)
But if you really wanted to do this in C++, try something like this:
I've left creating the files to you, so that you can run it without fear of messing up your filesystem.