If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Wildcards! Which one?

Im working on a simple file list program that list folders and files using CFileFind. Heres how the program goes!
1. User types a directory in a edit box
2. Presses button and files and folders get listed.

**If user wants to go back a directory

1. Presses the back button

And the back button is my problem. I know the problem is the Wildcard format. Im using a CString with a addition "/.." eg....(CString cp = m_Directory + "/..");
I tried CString cp = m_Directory + "/.." + "*.*" and vice versa with no luck
My question is how do I add a "*.*" to the CString cp? If I don't add "*.*", I know that all the files will not get listed.Only one folder gets listed when I press the back button

Re: Wildcards! Which one?

Dang, man its hard...even looked up the IsDirectory on msdn with no luck
heres some code that I came up...jerry rigging and still does not work entirely..i get double folders of the directory im in.

One suggestion to make to you is that you first write simple programs that perform the basic task you're looking for.

Your code is a jumble of listbox calls, button calls, and other things totally unrelated with writing a function that recurses through a directory, causing confusion, not only to you, but it clutters the code so that others helping you have to filter out the unnecessary noise.

If you take a look at Victor's example, that is exactly what you should be writing first, making sure you are familiar and know how to use the CFileFind class. Once you know how to properly use it, then you apply it to the larger program.

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.