Momenteel ben ik bezig met het openen van diversen bestanden waarvan de gehele naam bekend en uniek is, echter wordt deze vervolgend door .random cijfer.
om dit bestand te kunnen open heb ik open("filenaam.*", O_RDWR); gedaan. Echter blijkt dit niet te werken zoals dat in commandline werkt. Wat is de eenvoudigste manier om toch een dergelijk iets als een * in het filePATH te gebruiken die het cijfer vervangt?
Currently I am working on opening miscellaneous files whose full name is known and unique, however, is that by suing. Random number.
to open this file I open ("file name *.", O_RDWR); done. However, this is not working as it works in command line. What is the easiest way to still use that replaces the figure? Such a thing as a * in the file path
MvG Robbert
* is a wildcard character. If your filename has * in it, it needs to be escaped as in "file name \*."
My excuses for my very late reaction in the first place. In the second place my excuses for the dutch language. For some reson i assumed this was a dutch forum.
May i thank you both very much for the effort of translating and answering my question.
The problem is solved using the glob function. With this function i could use wildcards like * in path names.