Hi,
How can I open a file in directory that that will be the only file in that directory but I woun't know the name of it?
I want to open the file read it and delete it and an other application will put a new file there...
Thanks. /H
Hi,
How can I open a file in directory that that will be the only file in that directory but I woun't know the name of it?
I want to open the file read it and delete it and an other application will put a new file there...
Thanks. /H
What compiler/OS are you using? (It'll be non-standard functions to do that type of thing)
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
For a standard (though hackish and slow) method, you could always attempt loading every combination of name (providing of course, that you know the file extension, and that we're assuming 8 character file names max) and checking for its existance.
Actually I think theres a Win32 function that gets the file names in a directory and returns them in the form of a pointer to array of strings... Unfortunatly I cant seem to find it. Sorry.
"There's always another way"
-lightatdawn (lightatdawn.cprogramming.com)
Look up FindFirstFile() and FindNextFile() on msdn.microsoft.com