file openen met een *

Hallo Heren,

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?

MvG Robbert
From Google Translate:
Hello Gentlemen,

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 \*."
@MvG Robbert (from Google Translate from English into German:

ist ein Platzhalter. Wenn Ihr Dateinamen hat es in *, muss es wie in escaped "Dateiname \ *."
Hello gentlemen,

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.

MvG Robbert
Topic archived. No new replies allowed.