So being a child of the 50's I thought I knew just about everything about maneuvering file folders using DOS. With this knowledge I was able to mimic the behavior of the chdir (cd) DOS command to change folders in my file open dialog. I was finishing up for the night and then I noticed that the ".." file entry was missing when I was one folder above the root.
I thought I screwed up.
So this morning I quickly did some research and also went into COMMAND and got into a folder, one above C: as in C:\folder. I typed "Dir /P" and sure enough there wasn't the old ".."
Now, at the C:\folder1 level you can type ".." and press enter to go to the root directory of "C:\", but the ".." isn't listed.
As part of my file dialog behavior, the path passed to the class method create has to have a "\" at the end of the path name. If it isn't there I add it. (My code does path+'*.*' to get all the folders into the file list and then does path+filemask to search for the specific file extension files to add to the list. )
It was a quick fix this morning to just do a
TimesInStr(C:char;ss:string):integer;
function that counts the "\" in the path string. If it is 2 then I just add ".." as the first directory in the file list.
Problem solved because when my code sees ".." as the selected item in the dialog and the "Chdir" button is clicked on, it will now bump the path up to the previous folder level
