Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set IE Browse/Save File Folder in VFP?

Status
Not open for further replies.

rsmock21

Technical User
Joined
Oct 31, 2002
Messages
7
Location
US
I am trying to find a way to set the default folder IE opens to when a user selects a file on a webpage for download (and also upload, as is the case here). By default, it seems IE opens to the last folder used when saving or selecting a file. Is there a way to set this so that the next time the user opens that dialog box it opens to the specific directory? I'm trying to make this as seamless as possible (i.e. prevent the user from having to navigate to the directory where they need to be). I assume one method is directly editing the registry where IE stores this info. Is there another way?
 
Take a look at my AppLaunch Method that uses the shellexecute API. I posted a message about it at:

Hyperlink to a file
thread184-243825

Jim Osieczonek
Delta Business Group, LLC
 
Thanks, Jimoo. I actually used that function to call the web browser from my app, which works great. But I still can't seem to explicitly set the directory that IE pulls up by default in the dialog window when a user clicks a link to download a file, or a button to select a file.

Borrowing from your code in Thread184-243825

Code:
lnFileStatus = ShellExecute(0,"&tcCmd",tcOutFile,"","",1)

where tcCmd="Open" and tcOutFile is the URL. I thought that inserting a string for the directory in either of the following empty arguments might work. For example,

Code:
lnFileStatus = ShellExecute(0,"&tcCmd",tcOutFile,"C:\AppTest\Download","",1)

But so far the default directory comes up the same (not what I specify here). The directory listed here is valid. Is it possible to set this with ShellExecute? Any ideas?

Thanks,
Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top