NET framework and can therefore use the System. Environment type's. GetFolderPath method to ask for special known folders, the designated folder for downloads is - surprisingly - NOT among them. Only the WinAPI's Known Folders API allows retrieval of the designated downloads folders in a robust fashion , without relying on fixed relationships with other known folders:. For a list of all supported shell: -prefixed folder identifiers, see this article.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Where is the "downloads" folder located Ask Question. Asked 2 years, 2 months ago. Active 1 year, 2 months ago. Viewed 8k times. Not that this has any bearing on the main thrust of your question, but what happens if the user has their web browser configured to prompt for a download location instead of auto-saving to Downloads?
I assume you're talking about browser downloads since I can't think of another application that downloads to that directory by default.
What if the user's browser doesn't resolve naming conflicts using that same scheme? What if the user simply removes the anti-piracy code from your script? How does preventing multiple copies of the same file on the same computer prevent piracy, anyways?
Add a comment. Active Oldest Votes. NameSpace 'shell:Downloads'. More importantly, the downloads folder may have been explicitly configured to be in an arbitrary location , unrelated to the documents location The only robust way to determine the downloads folder's location is to ask the system for it: PowerShell, as of PowerShell Core 7. Adding such a feature has been proposed on GitHub , however. Path For a list of all supported shell: -prefixed folder identifiers, see this article.
Regarding localization of known-folder directory names, since Vista NT 6 the primary, default names are English. Localized installations of Windows in some cases use either junctions like Unix bind mounts or directory symbolic links like Unix symlinks to provide localized names at a low level in the file system, and at a high level the graphical shell shows localized names, but the preferred paths for applications and scripts to use are the common English names.
As for the "naive answer", I'd say that's something else entirely Thanks, BACON, but I don't see a semantic difference between "quick-and-not-necessarily-accurate" and "which typically but not always works". Is it the word "naive" that you disagree with, and, if so, why?
Please see the footnote I've added, which explains the intended semantics. I, too, usually refer to a not-so-robust implementation to be the "naive approach. MrVillager 10 MrVillager 10 6 2 2 bronze badges. With Edge, start by clicking the menu dots in the upper right corner of your screen. Next, choose 'Settings' and scroll lower to 'Downloads. With Safari, start by clicking on 'Safari' in the top left corner. Select 'Preferences' and then 'General. Log in Social login does not work in incognito and private browsers.
Please log in with your username or email to continue. No account yet? Create an account. Edit this Article. We use cookies to make wikiHow great. By using our site, you agree to our cookie policy. Cookie Settings. Learn why people trust wikiHow. Download Article Explore this Article methods. Tips and Warnings. Related Articles.
Method 1. Open Google Chrome. It's a red, green, yellow, and blue sphere-shaped icon. This icon is in the top-right side of the Chrome window. Click Settings. It's near the bottom of the drop-down menu. Scroll down and click Advanced. This option is at the bottom of the page. Doing so will open a window with your computer's folders displayed. Select a folder. Click a folder into which you want downloads to save.
It's in the bottom-right corner of the window. This will choose the folder you clicked as the default location for any subsequent downloads.
You can also click Ask where to save each file before downloading to enable or disable a prompt for each download. Method 2. Open Firefox. This is the globe-shaped icon with an orange fox wrapped around it. It's in the top-right corner of the Firefox window. This prompts a drop-down menu to appear. Click Options Windows or Preferences Mac.
This gear-shaped icon is in the drop-down menu. Click the General tab. It's in the upper-left side of the window. Check the "Save files to" box. Click the circle to the left of the "Save files to" option to enable downloads for a specific location.
If you would prefer to be asked where to save a download every time you download something, click instead the "Always ask you where to save files" circle. Click Browse Windows or Choose Mac. This button is on the right side of the current download folder's name. Clicking it opens a window with folders on your computer listed. Click Select Folder.
Method 3. It's in the top-right corner of the Edge window. This option is at the bottom of the drop-down menu. Scroll down and click View advanced settings. It's near the bottom of the menu. Scroll down to the "Downloads" section and click Change. This will open a window with folders on your computer listed. Click a folder that you want to set as your default download location.
You can also click the "Ask me what to do with each download" switch to have Edge prompt you for a confirmation before every download.
Method 4. Open Internet Explorer. It's a blue "e" with a yellow band wrapped about it. Click View downloads. It's near the top of the Settings drop-down menu. Click Options. This link is in the bottom-left corner of the Downloads window.
Click Browse. It's to the right of your current default download folder's name. Click a folder that you want to use as your downloads' save location. Click OK. Doing so saves your changes. Method 5. Open Safari. This app resembles a blue compass. You'll likely find it in your Mac's Dock.
0コメント