0

Many desktop applications (such as Mozilla's Firefox web browser) use the Desktop folder as the default to open/save files. For example, in Firefox, if you go to VirusTotal and click on the Choose file button, it will always open up a dialog box pointing to the Desktop folder.

I prefer to keep the Windows Desktop fairly empty, and so I use a different folder as my "active" folder. To keep it simple for this question, let's just call it C:\Stuff.

What I would like is when an open/save dialog box is opened (like the one mentioned above), for the dialog box to point to the C:\Stuff folder. Given that I don't want to have to recompile every application with this change (and not all application are open-source), I would like to know how to accomplish this in Windows 7.

Importantly, please note that I want all the files to be stored in C:\Stuff and not the Desktop folder. I also do use the Desktop folder for a few things, so I don't want to clutter up the Desktop folder, or have hundreds of icons on the desktop (I'm happy with the 8 icons I currently have).

6
  • Does this Change default download location in Windows 7 answer your question?
    – DavidPostill
    Commented Jun 13, 2021 at 14:03
  • @DavidPostill I appreciate the link, but that won't work. That technique just changes the Download folder for Internet Explorer. Commented Jun 13, 2021 at 14:09
  • Probably IE is the only program that uses that location. Everything else (like other browers) does it's own thing. I think you would need to write a hook into the DLL that manages the system open/save dialog. That requires serious programming skills. Note that some programs already do this (like the other browsers)
    – DavidPostill
    Commented Jun 13, 2021 at 14:13
  • @DavidPostill Thanks. What about symbolic links, hard links, junctions, etc.? I know a bunch of people here (possibly yourself included) use them regularly for different uses. I use them just once in a while, so I defer to the experience and knowledge of others. Commented Jun 13, 2021 at 14:18
  • Links would just move the Desktop somewhere else. They won't solve your issue.
    – DavidPostill
    Commented Jun 13, 2021 at 14:28

1 Answer 1

0

The default open/save folder is a per program setting. The open/save dialog can also 'remember' the last chosen folder and will return there.

Taking your example of virustotal.com, it presented my Downloads folder. I then browsed to My Documents and opened a file from there, uploading it. I closed my browser, opened it again and returned to virustotal. Clicked the upload button and the dialog opened in the My Documents folder.

If you want to change the location of a default folder like Downloads or My Documents, you can open explorer and under This PC right click on Downloads and click Properties. Navigate to Location and chose a new location for your standard download folder. You can do the same for My Documents, Music, ...

6
  • Thanks. Which web browser did you try? Commented Jun 14, 2021 at 9:02
  • I tried this with Chrome, Edge (i know) and Firefox. All three browser showed the same behaviour, its the default windows behaviour of the File Dialog.
    – Silbee
    Commented Jun 14, 2021 at 9:05
  • Hmmm... I get a different behaviour in Firefox. Which version of Firefox did you test, and which version of Windows? In Firefox, the Open dialog box always comes up pointing to the Desktop folder for me on sites like VirusTotal. Maybe you somehow fixed it, which would be fantastic, but we need to figure out what you did! Commented Jun 14, 2021 at 9:21
  • Sorry for the late reply. I'm on a different machine atm, so i have retested with Firefox, version 89.0.1, and had the same results. I opened firefox, went to virustotal, picked a file and in the file dialog browsed to c:\windows\system32 and chose cmd.exe as file to upload. After receiving the results, i browsed to cnn.com and closed firefox. I opened firefox again, went to virustotal and clicked Choose file again. The file dialog opened on c:\windows\system32 where i last left it.
    – Silbee
    Commented Jun 18, 2021 at 7:36
  • For more information on the windows file dialog, check out docs.microsoft.com/en-us/dotnet/api/… Specifically the InitialDirectory and RestoreDirectory methods. But again, this is handled on a per app basis and default behaviour is to restore the file dialog to the last used folder if it still exists.
    – Silbee
    Commented Jun 18, 2021 at 7:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .