Hello:
I have a question I hope someone could help me
Is there a way to know which files are there in the directory where a exe is? I mean, I have my.exe and I wrote in c++. I want it to be able to see all the files in that dir and choose only those with extension *.txt let's say...
If there's a way to find out the info about the files, I can manage to choose only those I want........ is there a command or a sentence for that?
I have another newbie question.... that very same program reads files in order to work, and if it doesn't have any parameters in command line, I want it to do as I stated above.... however, if I do pass it a parameter I want it to read the file I pass:
my.exe thisFile.txt b.txt c.txt
And that does work, it reads all the parameters... however, if I pass too many parameters:
my.exe a.txt b.txt c.txt d.txt e.txt f.txt g.txt h.txt
it just reads like the first 5 or something and then hangs.... inside there's just a for loop that keeps reading the files, is there a problem about passing too many parameters? too long the command instruction maybe? any work around?
Thanks for your help and your time.
poeta