Library - Set Save Folder

Page 1 of 2 12 LastLast
    Library - Set Save Folder

    Library - Set Save Folder

    How to Set the "Default Save Location" Folder for a Library in Windows 7
    Published by
    Designer Media Ltd


    How to Set the "Default Save Location" Folder for a Library in Windows 7

       Information
    This will show you how to set an included folder in a Windows 7 library as the default save location folder to save everything new, that is copied or moved into that library, to that folder location. By default, everything in a library is saved into a Personal user folder.

       Note
    Libraries let you access and arrange items from one or more folders quickly without moving them from their original location. Libraries themselves don't store your files or folders. Instead, they point to different locations on a hard disk or external drive attached to your computer. This gives you easy access to a category of files no matter where they are stored. For instance, if you have music files on your hard disk and on an external drive, you can access all of your music files from within the "Music" library.


    For more information about Windows 7 Libraries see:
       Tip
    The full path to the hidden Libraries folder is below.

    C:\Users\(User-Name)\AppData\Roaming\Microsoft\Windows\Libraries

    OR

    %AppData%\Microsoft\Windows\Libraries





    Here's How:
    1. Open Windows Explorer, and click on Libraries in the navigation pane. (see screenshot below step 2)

    2. Right click on the library (ex: Music) that you want to set the default save included folder for, and click on Properties. (see screenshot below)
    Library - Set Save Folder-libraries.jpg
    A) Select (hightlight) the included folder that you want to set as the default save to folder, and click on the Set save location button. (see screenshot below)
    Library - Set Save Folder-properties-1.jpg
    B) Go to step 4.
    OR

    3. Open the library (ex: Music) that you want to set the default save included folder for. (see screenshot below step 2)
    A) Click on the # Locations toolbar button. (see screenshot below)
    Library - Set Save Folder-library.jpg
    B) Right click on the included folder that you want to set as the default save to folder, then click on Set as default save location. (see screenshots below)
    Library - Set Save Folder-set-1.jpg
    4. Click on OK. (see screenshots below steps 2A or 3B)
    NOTE: You will notice that the new default save location folder has a check mark next to it.

    5. Close the library window when done. (see screenshot below step 3A).
    NOTE: You will not see this if you did step 2 instead of step 3.

    6. Close the Libraries window when done. (see screenshot below step 2)
    That's it,
    Shawn








  1. Posts : 966
    Windows 7 Enterprise
       #1

    Hey Shawn,
    Something I've just found that's tripped me up.

    If the default save location is on another drive and that drive is removed, it will no longer appear in the library.
    When trying to create a new document, you may end up with a 'File System Error (512)', as a default location does not exist.
    You'll then need to revisit step 3A or 4B to set one.
      My Computer


  2. Posts : 71,959
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #2

    Hello Xarden,

    Correct, if you were to remove the drive where the default save to location is located, then you would need to set a new save to location to stop getting the error.
      My Computer


  3. Posts : 14
    Windows 7 Ultimate x64 SP1
       #3

    Hey guys.

    This may be a little outside the scope of this article - it's to do with .NET programming not detecting a custom documents folder.

    I've set up my documents library to a different location (B:\Libraries\Documents) as outlined in the steps above. I've attached a screenshot of the locations window so you can see it's set up right.

    Everything works ok except an application I wrote in VS C# .NET that saves & loads a file from the Environment.SpecialFolder.Personal folder (which retrieves a dynamic path to the my documents folder). This application still reads/writes to the C:\Users\Username\Documents folder for some strange reason. This may be outside the scope of this thread but I'm just curious as to how it arrives at this destination and how to fix this - Obviously the folder path it fetches is dynamic as it gets the currently logged in username, but how come it doesn't get the right documents path? :S
    Attached Thumbnails Attached Thumbnails Library - Set Save Folder-docs-library.jpg  
      My Computer


  4. Posts : 71,959
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #4

    Hello CJ,

    You might see if setting your program to save to the location below may work instead. It's the path to the Documents library folder itself. From there, it would actually save to whatever you had set as the default save to location in the tutorial.

    %AppData%\Microsoft\Windows\Libraries\Documents.library-ms

    Hope this helps,
    Shawn
      My Computer


  5. Posts : 14
    Windows 7 Ultimate x64 SP1
       #5

    Thanks Shawn, I'll give that a bash tonight after work! :)
      My Computer


  6. Posts : 71,959
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #6

    You're welcome. I hope it'll work for you. :)
      My Computer


  7. Posts : 14
    Windows 7 Ultimate x64 SP1
       #7

    Well as usual it wasn't quite that easy!!!

    I tried several ways to load that folder, but it seems .NET applications do not like trying to load it directly. (When I tried to create a folder in the docs it said that folder already exists, which it didn't)
    I ended up doing a bit of googling/prowling through stack overflow and found this neat little API that helps with libraries and such: WindowsAPICodePack

    So long story short Environment.SpecialFolder.Personal gets the common documents repository for the current user.
    I had to use the ShellLibrary component of the above API, use it to find the documents library as follows:

    Code:
    ShellLibrary Documents = ShellLibrary.Load("Documents", Path.Combine(Environment.GetEnvironmentVariable("appdata"), @"Microsoft\Windows\Libraries\"), false);
    Then get the full path of the library's default save folder and then simply continue as per normal from there... :)
    Code:
    string ProgramDir = Path.Combine(Documents.DefaultSaveFolder, "NZB Watcher");
    string OptionsFileName = Path.Combine(ProgramDir, "options.xml");
    And Huzzah!!! It's now working perfectly! Thanks for your help mate :)
      My Computer


  8. Posts : 71,959
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #8

    Tha'ts great news bioNuke. I'm happy to hear you got it sorted out. To bad they could just make it easier to do.
      My Computer


  9. Posts : 18
    debian, mint, mx, 7
       #9

    thanks. this article is exactly what i was looking for. funny how ms didn't include the desktop in the library, because, like, duh
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 05:14.
Find Us