Why do folders like “My Pictures” come back after I delete them?


Some people are offended by the special folders like “My Pictures” and “My Music” and delete them, only to find them being re-created. What’s going on?

Windows itself is okay with you deleting those folders. Some corporations, for example, remove those folders from their employees’ machines because they don’t want the employees looking at pictures and listening to music while on the job. (Go figure.) And if the folder is deleted, Windows doesn’t try to bring it back.

However, any program can ask for the folder to be re-created. For example, if a program passes the CSIDL_FLAG_CREATE to the SHGetFolderPath function, then Windows will create the specified folder if it doesn’t exist. Similarly if it passes pass fCreate = TRUE to the SHGetSpecialFolderPath function.

If it really troubles you, you can set a creation audit on the My Pictures folder and see which program is re-creating it.

Comments (47)
  1. Aaargh! says:

    What is so special about these ‘special’ folders ?

    What’s the difference with a normal directory, and why are they there, instead of letting the user create his own directory structure ?

  2. James Curran says:

    Is there a way of creating our own "special" folders?

    I’ve noticed that folders like "My Music" in my personal "My Documents" folder becomes "JamesCurran’s Music" when I’m logged on as Administrator. Is there a way of creating, say, a "My Widgets" subfolder to "My Documents" that functions the same way?

  3. M-Dub says:

    What do we have to do to set a creation audit on these folders?

  4. Cooney says:

    Aaargh!:

    It would appear to be an attempt to get people to organize their stuff at some level; before the my docs and related crap, people would stuff their data wherever (even in windows). They still do that, but not as much. Now that the bulk of your user data is sitting under my docs (and the other directories in your user directory), it’s easier to locate them, back them up, and salvage them.

    The specific reason they’re there is that they’re associated with a CSIDL. This gives programs some clue as to where their data files could go – presumably, mspaint would stick files in my pics by default, and photoshop may stick them in there too, so when you go to look for your photo, you don’t have to remember who put them there.

    Raymond, is there a mechanism for changing the directories?

  5. Josh says:

    What I hate is the stupid ‘My eBooks’ folder that Adobe reader creates, and then recreates, and then… Well, you get the picture. I have never even had any file in that directory, much less an eBook.

  6. <a href="http://www.x-setup.net/">http://www.x-setup.net/</a&gt; includes functionality to change the paths (or at least my old version of it does).

  7. Ben Watson says:

    TweakUI (http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx)

    also changes the paths for those folders. The first thing I do when I setup my computer after a fresh install is map My Documents and Favorites to a folder on my data drive.

    (I hope that URL comes out ok…this is the first time I’ve ever posted anything.)

    I, for one, find the My Documents and My Pictures folders useful, but the others are of dubious or limited value. I store everything in a neat hierarchy of subfolders, but I can’t stand the My eBooks folder, and now Visio 2003 has created a My Shapes folder, Virtual PC 2004 create a My Virtual Machines, my HP printer software made My Scans, ugggh…when will it end?!

    Thanks for the great blog, Raymond! I’ve been reading all your back issues, and have learned more than I ever thought possible from a blog.

  8. Miguel Garrido says:

    About MyEbooks,

    You can remove that folder by renaming ebook.api (to say ebook.bak) in Acrobatplug_ins folder, that won’t load the ebook plug-in which creates that folder.

  9. quanta says:

    It’s the inconsistency that bugs me. Most programs will create My eBooks, but Microsoft Reader creates My Library. Raymond, any chance MS Reader will get a new version anytime soon?

    Then most Microsoft games will create a "My Games". Well, except "Age of Mythology"; they think they’re smart by keeping savegame files in their local dir. EA feels their games are so important they need their own "EA Games" directory. And some games think they’re EXTRA special and they need their own special folders…

  10. Superman says:

    Part of the problem with having so many special folders beyond my documents is, as has been said to some degree already, that it forces someone else’s directory structure and way of thinking on you, instead of allowing you to work in a way that is more efficient for you. Could we all learn to work that way? Certainly but does it really carry any real benefit for the user beyond that? I don’t think it does.

  11. Johan says:

    Those directories were the main reason I gave up on using My Documents for anything. Having a standard location for documents was a good idea that was destroyed by applications trying to dictate the way I organize my files.

    I just let applications create their useless directories in the default My Documents directory and store my documents in another directory, where I don’t have to fight with applications for control.

  12. For "My Pictures"/"My Music" etc the easiest solution is to set their paths to "My Documents" vis any knid of tweak (X-Setup rules) or by hand in registry.

    This doesn’t work for Adobe’s "My eBooks" though. To disable that you are to delete "eBook.api" in Plug_Ins folder of Acrobat or Reader. Instead of deleting, changing extension to ".noapi" or whatever helps too. Surely enough, either way you lose this plugins’ functionality

  13. MB says:

    I think the intended solution is to move eBook.api from the Plug_Ins folder to the Optional folder.

  14. If your machine belongs to a domain, you can also change these paths using Folder Redirection Policy.

    As far as auditing goes, I’m not sure how one would apply an audit ACL to an object that does not exist yet. However, one could create an audit ACL for folder creation on the parent directory (My Documents).

  15. Serge Wautier says:

    I’d love to have a "My Downloads" that IE would use by default as the save location.

    My 2-cents,

  16. Raymond Chen says:

    IE defaults to the directory you last downloaded to. How much more obvious do you want it?

  17. BobD says:

    IE defaults to the directory you last downloaded to. How much more obvious do you want it?

    with respect, not that obvious. it’s convenient to change the location on a case-by-case basis but leave the default alone (esp. when the save path is long or hard to remember.)

  18. BobD: At least in Windows XP and 2000, the Save dialog box has a drop box for the "File name" field where the recent files have been saved, so you get a history of locations where you have saved files. Worst case scenario, you could have a Shortcut to where you save your files or change the icons in the left in the common open/save dialog to wherever you want.

  19. Derek Park says:

    Bob, on a case-by-case basis, you can just browse to the directory you want, and the next time you open it, browse back to your "default" directory. Maybe one out of a hundred people want the functionality you’re describing. A lot more people complain when their programs don’t remember the last places the opened from and saved to.

    Really, how often do you need to save just one download to your non-default directory? Whenever I’m saving a file to anywhere other than my desktop, I typically follow it with several more. The more natural default is to save to wherever you saved last.

  20. Chris Lundie says:

    When you install Windows, it should ask if you read Raymond Chen’s blog. If you answer yes, then it should change every behaviour of the operating system to be opposite to normal. That should please everyone.

  21. foxyshadis says:

    Er, wulong, firefox has the exact same behavior, aside from buggy old versions. (Right up to have different last-saved locations for left-click vs. right-click-save vs. save image.) The only time it’s configurable to a default is when you have no choice – when you set it to silent download.

  22. Aaargh! says:

    "It would appear to be an attempt to get people to organize their stuff at some level; before the my docs and related crap, people would stuff their data wherever (even in windows). They still do that, but not as much."

    A long, long time ago, some very wise men created a thing called a "home directory" just for that purpose.

    Unfortunately, most users run their box as administrator, and lots of win32 applications don’t know how to handle running in a restricted environment, so they put their stuff all over the place. They shouldn’t even *have*, write access to the windows or winnt dir.

    Knowing that lots of windows users are inexperienced and they do not know they should be running their stuff under a restricted user account and use the administrator account for what it was meant for: administrative tasks, maybe Microsoft should have made using the Administrator mode unattractive. I’ve seen a few linux distro’s add a red warning border around the file managers when running as root, to warn and remind you you have full access and you should be carefull. A similar feature would have been a good idea in e.g. Win XP home , but even more unattractive to counter greater cluelessness.

    You could e.g. let all administrator logins run only in grayscale, to make it unusable for day-to-day work.

  23. Ben Cooke says:

    I really dislike these "special folders".

    I think it’s much more sensible to "categorise" my documents by *purpose*, not by *file type*. I hate it when applications make their own subdirectory under my documents, such as the "My eBooks" thing that Josh pointed out as well as "Visual Studio Projects" and other such things.

    I don’t keep my programming projects in a different directory just because I happened to make them in Visual Studio. I’m not application-driven; I don’t think "Ooh, I wrote my widget project in Visual Studio.NET!", I think "I want to load my widget project" and I load it and let Windows figure out what needs to be done. My Visual Studio projects live alongside my projects where I don’t use an IDE at all, my projects written in Perl, my projects for UNIX systems… all in one directory, categorised by what they *are*, not by what created them.

    Application-specific document directories are a misfeature. Fortunately, when I use Windows it’s Windows 2000, so much of this lunacy is avoided. ("My Pictures" does show up sometimes, but since the Windows apps that go looking for it in Windows XP haven’t yet been changed to look there very few applications actually request that it be made.)

  24. Norman Diamond says:

    When those folders keep coming back it’s not always because of unruly applications calling those APIs, sometimes it’s because of unruly applications NOT calling those APIs. If an unruly application always called those APIs then those folders would keep coming back with their correct names. But sometimes those folders come back with names that are only correct for a different language version of Windows. And sometimes those folders come back on the C drive, or get added to folders that already existed on the C drive for use by a different OS.

    Sometimes this results in multiple folders in the Start menu and the use has to guess, for example, which Accessories subfolder to look in today. Sometimes this results in corrupting other OSes that are already installed (some of those times it’s Microsoft products destroying Microsoft products, though not usually). Sometimes this results in newly added files not even being visible at all where they’re expected.

    11/23/2004 12:27 PM Raymond Chen

    > IE defaults to the directory you last

    > downloaded to.

    SOMETIMES this is a reason for being unable to delete a directory after having already emptied the directory. But with recent versions of IE and/or Windows it seems that this isn’t usually the reason.

    (By the way, in another note someone kindly gave a pointer to WhoLockMe, and my empty but undeleteable folder has a handle opened by explorer.exe not by iexplore.exe. If I put my Explorer window in that folder then it has handles opened by two explorer.exe processes, and if I move my Explorer window back to any other folder then the undeleteable folder reverts to being locked by one. To add to the confusion, opening the Applications button in Task Manager, right-clicking and choosing Show Process, matches the Explorer window to the opposite explorer.exe process from the one that I expected. The undeleteable folder does happen to be one where I downloaded some stuff into from IE, but not the most recent and not in any still-open instance of IE.)

  25. Stefan Kanthak says:

    Re: HOME directory

    If there ain’t one set in the user account then Windows defaults it to %UserProfile%

    Re: relocating "My Documents"

    There are two supported ways: perform an unattended installation and use the following lines in your A:WINNT.SIF or I386WINNT.SIF:

    [GUIUnattended]

    ProfilesDir = "…"

    The other is to use a group policy and "redirect" folders.

  26. Michael says:

    On a related note: why are Windows Media Player album-art images treated as protected system files since v10 (they were formerly just hidden files)? If you delete them or replace incorrect album-art in folder.jpg with the correct images, WFP seems to bring the old files back and overwrite the more correct data files.

  27. Mike Totman says:

    An even better way to move My Documents is to right click on it, choose "Properties" and click the "Move …" button. This will even move the files to the new location for you.

  28. wulong says:

    Serge, yuck.. I like my downloads on the Desktop, but to each his own, right? This should be configurable like it is in *ahm* Firefox.

  29. A Regular Viewer says:

    Re. ‘last-location-used’ folders for dialog boxes.

    Hate them. Hate them. Hate them. Networked computers. If the machine last accessed is not switched on or is otherwise unavailable, the applications hang. Especially if the machines run Windows 98. Yes. A lot of corporate desktops are still running Windows 98.

  30. Jason Malinowski says:

    Of course, I’ve found that hiding the folders solves the problem quite well, since programs will just continue to use the folder without really noticing (very useful for programs [*cough* McAfee virus scan *cough*] that insist in adding stuff to the start menu every time they update.)

    Still….this doesn’t help those who have hidden files / folders visible (although they still are hidden from the start menu.)

    Perhaps there’s some way to write a program to make them invisible to explorer windows?

  31. Thomas says:

    I’d love to have a "My Downloads" that IE

    > would use by default as the save location.

    What if you are downloading something for a friend?

  32. Ben Cooke says:

    There are lots of times which I have wished that "last option used" was separate from "default option". Text editor TextPad has the right idea; it has defaults for different kinds of files, but you can override them for just one document without having to change them back later. Sadly, since it’s a text editor it has nowhere to save the settings so you have to reconfigure them each time you load the document back in.

    I think what would be best for me is to have application-specific shortcuts in that sidebar that Windows 2000 added to the common file dialogs (which I currently have disabled because it’s completely useless to me with only global options.) If I could configure my web browser to have a button to return to my default download directory I’d be more willing to save things in other places; right now, I tend to save things to the download directory and then move them away just to avoid having to navigate back to the download directory next time I save something.

    In fact, my *ideal* would be to be able to configure it so that it would remember download directories on a per-site basis, so that when I’m (say) downloading a bunch of related packages for a single application they’ll all go into the same place, but if I then go to a completely different site and save something else it’ll default to my usual download directory.

    That’ll drive most users nuts though, I’m sure. Maybe I’ll start using Firefox and hack it to do what I want. :)

  33. Arun Philip says:

    You really out to reiterate your big warning (http://weblogs.asp.net/oldnewthing/archive/2003/11/03/55532.aspx) about not messing with the "Shell Folders" registry key to change the paths for these ‘special’ folders. (I should know, I was guilty of the same until I came across TweakUI).

    Off-Topic: I’ve been getting occasional "Server is busy" errors from more than one blog on the weblogs.asp.net site. Could you inform the appropriate team?

  34. Norman Diamond says:

    11/24/2004 11:37 AM Glaurung

    > why is "application data" stored under

    > windows? And why do Outlook and Outook

    > Express default to saving your email inside

    > the windows hierarchy?

    I only saw that behaviour on machines that were upgraded from Windows NT4. The existing directories continued to be used after the upgrade.

    (Of course unruly applications can depend on doing similar things regardless of which version of Windows is installed and regardless of whether it was an upgrade install.)

  35. Glaurung says:

    1. If part of the point of having a "My whatever" directory is to create a single, consistent, easily backed up place for your data, why is "application data" stored under windows? And why do Outlook and Outook Express default to saving your email inside the windows hierarchy?

    2. Why is it always "My" everything? Why not just "Documents," "Pictures," and so on. After all, novice users aren’t going to know or care what the name of the folder where their stuff is saved is — and this experienced user, at least, finds the endless "my this" and "my that" neither friendly nor cute, but simply annoyingly puerile. Besides, most of the time, it’s *not* actually "my" documents, or even "my" computer. It’s the company’s computer and the documents belong to them too.

  36. I completely fail to see why anyone should be offended by having folders like "My Pictures", etc. In my not so humble opinion, if one is offended by such folders then one was just walking around looking for something to be offended at. These people clearly have to much time on their hands.

  37. Paul Coddington says:

    Being truly fed up with the ridiculous custom special folders created by mad programmers, I found a new strategy for dealing with them: hide the unwanted folder and link it to a more suitable folder using a junction point.

    So, take the ‘Visual Studio Projects’ and ‘Office Developer Projects’ folders, hide them, and link them to a single ‘My Projects’ folder.

    So, you can roll them together into something tidy that’s accessable at a glance. Because the folders still exist, the applications don’t try to recreate them, and when they use them, they are using your preferred folder via the junction point.

    James: the main reason people are offended is that you end up with literally a dozen unwanted folders (sometimes entire trees) with clumsy names cluttering your workspace making it harder to find things that you put there.

    Also, many of these applications do not have the courtesy to let the user specify the folder name and location or to reuse a standard folder that is already there ("let’s make another ‘My Music’ folder with a different name because OUR music is so cool).

    Even when they allow customisation, some will use the one specified but keep recreating the default regardless, every time they are launched.

    The point is, applications should respect the users preferences and personal space. If they need custom storage folders, they belong in ‘Application Data’ in the user profile, or elsewhere, not ‘My Documents’.

    At least Microsoft special folders can all be customised to different locations (yay for TweakUI).

  38. BlackTigerX says:

    how about a "recently used folders" on the left side of the Save As dialog?… that would require a new dialog, but that would be fenomenal, it could still default to the last used folder, but you could use your other used folders

  39. JimBob says:

    ….How about a special "my recently used toilet paper" folder? Or better yet, a "blogs that are a waste of time" folder that collects url shortcuts and is hardwired to IE to it will make big red borders on blog pages that are a waste to read? That way I could warn myself if I ever came back to this :-(

  40. Jeroen says:

    I originally used the following fix to prevent Adobe from creating a "My eBooks" folder:

    - delete the folder

    - create a read-only hidden system file with the same name as the folder you don’t want to reappear

    This works for some predefined folders, such as "My eBooks", "My pixaround" and "Archives". Other apps however generously rename my file and still recreate the folder. Aargh!

  41. Jeroen says:

    OT: I was originally looking for a way to teach Microzork Word how to open the last directory used when inserting pictures, instead of always defaulting to "My bloody pictures". Anyone? Thanks, Jeroen

  42. Jeroen says:

    I found this tip on http://www.subdiv.net/articles/xp/xp1.htm

    Remove E-Books, My Pictures and My Music from My Documents

    - Goto START then RUN.

    - Type "Regsvr32 /u mydocs.dll" and hit enter.

    They won’t come back.

  43. Severian says:

    When saving, my application allows the user to select from a drop-down list of the most recently used 25 folders, and has a global option to select the initial default between "Last saved folder" and "Current Folder." (Current folder can be determined because, like explorer, we provide a tree pane for navigating; different people have different expectations. I even change the default for myself occasionally.)

    Does this seem like a reasonable start?

    I also think MS’s left-hand bar for selecting between 5 or 6 places is useless. Even a "normal" user will accumulate many thousands of files in a year.

    I also thought the "My" this and "My" that were puerile and completely unnecessary, along with the default Fisher-Price look of WinXP.

    Jeroen: I agree, applications should remember where you last looked for things! It’s simple for developers and I find it hard to believe that MS Works doesn’t implement it in recent verions.

  44. Cinders says:

    I want all my pics deleted

  45. ingolfson says:

    I completely fail to see why anyone should

    > be offended by having folders like "My

    > Pictures", etc. In my not so humble opinion,

    > if one is offended by such folders then one

    > was just walking around looking for

    > something to be offended at. These people

    > clearly have to much time on their hands.

    And you Sir, are simply trolling for some flames. If one likes to have stuff organized in a certain way, and you have to fight the OS/programs to get what you want, frustration is bound to result, and for good reason!

Comments are closed.