1

When SaveDialog pops up first time and when FileName is '', and initial directory is not set, how to get directory path?

Srdjan Vukmirica
  • 743
  • 2
  • 8
  • 22
  • 3
    I don't understand why this matters. By the time the dialog returns and a file has been selected, the file name includes the path. What makes you ask the question? – David Heffernan May 20 '13 at 15:06
  • @David Heffernan - I want to check if file exists because if there is one, for example 'somepic.jpg' then FileName in dialog will automaticaly be 'somepic(1).jpg'. – Srdjan Vukmirica May 20 '13 at 15:10
  • That doesn't happen automatically in any file dialog that I have ever used. – David Heffernan May 20 '13 at 15:11
  • 3
    Any other program that does something like that will already know where it plans to save the file, so the program *sets* the initial directory in advance. Just do that in your own program, and *this* problem goes away. Don't let the dialog box choose the default save path. – Rob Kennedy May 20 '13 at 15:19

0 Answers0