-1
I need to take a file with certain extension to open in fopen, but do not know the name of the file, just know that it is in the same folder as main, would have any way inside the main to know which files in the same folder of main contain the extension I need? Ex: in the folder is the main. c and a test.txt (in case I don’t know the file name, only that it is .txt), and would like to open the test.txt in main by fopen (or if you have another command). I hope that has been made clear, I thank you in advance.
I think I understand, thank you
– KSM
Validates if it answers your question, accepts the answer as valid and gives up vote. Thanks!
– Mário João Vale