SaveFileDialog won't show existing file

  • Thread starter Thread starter Nayan
  • Start date Start date
N

Nayan

Hi,

I am trying to download a file from website, and to get the local file
name form the user, I am using SaveFileDialog.

I apply the filter (I parse the url to get the file name and assign) to
the saveFileDialog object.
But if my file already exists, it's not shown in the window.

Has anybody ever experienced something this?

regards,
Nayan
 
Nayan said:
Hi,

I am trying to download a file from website, and to get the local file
name form the user, I am using SaveFileDialog.

I apply the filter (I parse the url to get the file name and assign) to
the saveFileDialog object.
But if my file already exists, it's not shown in the window.

Has anybody ever experienced something this?


It sounds like you are not using the correct format for the filter. The
format is "File Type|extension". So if they were downloading a zip file,
the filter might look like "Zip Archive|*.zip".
 
Hi Tom,

Yes, you are right. I wasn't using the right filter.
I saw the example on web and used it. But it wasn't right. I was using
brackets like "Jpeg (*.jpg)|(*.jpg)";

Thanks a lot!

regards,
Nayan
 
Hi Nayan,

The following will work:

"Jpeg (*.jpg)|*.jpg"

The purpose is to display the valid extension to the user, which I find to
be useful.
 
Back
Top