OpenFileDialog and passing a relative directory automaticly to it

P

Peted

Hi

i have a circumstance where a user unzips a file, with a certain layer
of directories to get to a textfile.

So in any directory on the HDD they may end up with something like


dir1/dir2/dir3/dir4/dir5/file.txt

in most cases i can be sure the zip fie will extract as shown, but in
reality the only thing i could be certain of is the number of
directory layers and the specific names "dir5/file.txt"

so using OpenFileDialog, i want to have it auto open for the user to
the directory "dir5" so that they can click and select file.txt
without having to traverse the directories manually.

Becasue i know the numeber of directories layers will be the same, if
the directory names are not the same, how can i send releative path
information to OpenFileDialog so that it opens in correctly in dir5
for the user to select file.txt.

I must do this using relative paths, because they may extract the zip
file anyware.


any advice or help appreciated. thanks

Peter
 
P

Peted

Sorry i should have mentioned that i can determine the directory the
zip file is in when extracted, so i need to work out how to send
relative path information from that known directory to OpenFileDialog

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top