J
Jens.Toerring
tschi-p said:maybe my question is quite simple, but although searching like wild I cannot
find a solution.
I just want to append to a file, let's say to "c:\my folder\filename1.txt".
Be careful with the backspaces, you may need more than you show here;-)
Normally with append-option, the file is created if it doesn't exist. But I
want also the folder to be created if it does not exist - now if the
specified folder is not available, the file isn't created at all.
Is there an additional option at fopen that I couldn't find or are there
other useful functions that do exactly this?
No, there isn't. That's because the C standard doesn't even admit
that folders exist. So everything to do with folders (directories
for those from the UNIX camp;-) has to be done using system specific
functions. Perhaps your system has some functions (or even extensions
to fopen())) that does what you are looking for, but about this you
have to ask in a group that deals with your system.
Regards, Jens