Open Files from current directory using a wildcard C++ -
Is it possible to open files from directories given in C / C ++ by using wildcard characters?
Meaning, if I want to eliminate "to (node_id)" files from the current directory in my program.
Example: I have to open the files whose files names end with "to4". Desired Output: It will open all the files in the current directory with the filenames ending with "to4". If files 0 to 4, 1 to 4, to 2 to 4 and amp; 3 to 4 of the current directory are present, they should be opened.
If it is not possible in C / C ++, is there any other programming language that allows it?
not in standard C ++; You will need to Boost like OS-specific function calls or Boost file system. file system.
In any case, you can get a list of files in a given directory and can iterate on the list and open it only matches your parameters.
Comments
Post a Comment