I know how to download a specific file to a designated location. But my users chose the file to download, right-click on it and chose save target as - how can I control what the default download directory is?
Thanks in advance
Sounds like you are talking about downloading a file from the web, in which case this is the wrong forum.
If your application really is built with classic VB 5 or 6, then whichever of the several ways you might be doing this, you should already have that information in your code.
Sorry but your answer makes no sense to me. Yes I am talking about downloading a file from the Web using my VB6 program. I guess I didn't make that point clear. I send the user to a website where they have a choice of files to download, once they select a file and right-click they receive the normal pop up window and they select save target as - at this point a dialog box opens and they are asked where to save it to - the dialog box is not controlled by me, but I would like to be able to set the default directory - from inside my VB program. Can this be done? If so can some one point me in the right direction. I was hoping that there would be a CSIDL I could use, but it appears that the last place saved to is saved in Windows somewhere.
JoeAtWork was querying whether you were really doing this from VB, and suggesting that if you were then you should have all the info you need.
You then respond that yes, you are doing it all from Vb ... except that you are not (at least, not from your description); you are simply using VB to select a webpage. After that it is IE that controls the shots ...
To change the default download directory used by IE, you need to modify the registry. The key you are interested in is:
Note that this is a GLOBAL setting, so users may get upset if you change this without telling them or providing the facility to restore things to their original status after your application ahs done it's bits.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.