Windows 7: What is the Desktop.ini file and How Can I Remove It?

   Posted by David Kirk in Windows

Why do I see the desktop.ini file in every folder? How can I get rid of it? One of my neighbors called today asking me all of these questions. Let me explain the function and purpose of this ubiquitous mysterious file.


What is the Desktop.ini file?

This hidden file is placed in every folder to tell the operating system how to display and customize the viewing of that specific folder. For example, this allows a folder to have a custom icon. Microsoft has more boring info about customizing folders with this file.

desktop.ini example

Why did this file suddenly appear?

The file is typically set as both a hidden and system file. Most people start to notice the desktop.ini file after globally setting their system to show hidden system files and folders. Often it is most noticeable on the desktop. By resetting this setting to hide these files, the desktop.ini files will no longer be visible.

Can I just delete these files?

Deleting these files will just remove any customizations set by the desktop.ini file. Although it should not hurt your system, trying to delete these files can be frustrating as the Windows operating system may rebuild them.

 

About David Kirk

David Kirk is one of the original founders of tech-recipes and is currently serving as editor-in-chief. Not only has he been crafting tutorials for over ten years, but in his other life he also enjoys taking care of critically ill patients as an ICU physician.
View more articles by David Kirk

The Conversation

Follow the reactions below and share your own thoughts.

  • Jiltedone

    Leave as is mate, that will be regenerated by win after a while or on start up, if you do delete it, you might loose something or the desktop will start acting funny.

    • joel

      go to folder options and click ” dont show hidden folders they will disappear’

      • Dshultz

        Nice job

      • Timchuks87

        worked like a charm. Used t think it was a virus.Thanks

        • reza

          oh common! you really wanna say that you can’t distinguish between a system file and a virus!!!! usually viruses get back after hitting the refresh button or by double clicking on your drives, but not all off them let you see their beautiful content ;)

          • Me

            Oh COME ON! You mean you don’t know the difference between the word “common” and the idiom “come on”? Pffft! Perhaps an education may be in order… XD

      • Terlisner

        thanks to joel

      • http://www.facebook.com/ariel.tapere Ariel Vergantinos Tapere

        tanks bro…it really works…good job…

      • Rotan Benaia

        thanks…..nearly delete weird files which look funny in the content of every folders…lucky my sis advice to do some google search…pheeewww that was close!!! thanks again… :)

      • Yolanda K.

        Thank you…worked perfectly.

    • critters52

      Yah , I deleted it on my computer an noticed the icon for my recycle bin was suddenly missing. foutunitly I was able to get it back via change desktop settings,but it could have been worse. If it’s bothering you, just highlight and move it to you doc folder.. out of sight out of mind.

  • Soj

    1. Open the Windows Explorer
    2. Click on Organize and then on Folder and search options
    3. Go to the tab View and scroll down.
    4. Check the option Hide protected operating system files and click on Apply:

    This will just hide desktop.ini files.

    • Sabih Star

      Thanks man, I did it and its disappear at once.

    • Andrew

      Step 1.a: Select Desktop.
      Other than that, thanks for the advice. Worked a treat.

    • Fbashyam

      Thank you and good wishse

    • johnrobert

      thank you soj..

    • Barc777

      I’d like to see the protected operating files, with the exception of desktop.ini. Is there any way to do that?

      • Barc777

        Figured it out. Went to “Computer” in Windows Explorer, and unchecked “Hide”, clicked “Apply to all”, then went to my own profile’s desktop and checked “Hide”, but without clicking “Apply to all”. Worked like a champ!

      • Barc777

        P. S. I don’t really care whether I see it in WinEx folders; just don’t like it on the desktop. (One of my co-workers likes such a clean desktop that she has NO shortcuts, while another one has them all the way across his… There’s nought s’ strange as folk!)

  • Jtannercc33914

    Thanks Soj, I had one desktop.ini icon on the desktop for over a year now (when I got my new computer with Win7). That was annoying enough, but a second popped up a few days ago so it was time to do something. Your solution worked like a charm.

  • Jamilu

    Yeah it work for me.Thanks lol

  • Idiotsrus

    Setting your folder to show hidden, and then setting it back to hidden is maybe the stupidest advice iv’e ever heard.
    Just accept its there. Microsoft dont hire the brightest lightbulbs, so youre kinda stuck with.

    • Paul

      > Right?! Look, if you tell the machine to show hidden files, well guess what, desktop.ini is a hidden file. M$ could have put them in a folder in your “Users/name” area, I suppose, but then your customizations would be lost when you copied the folder, etc. To those who USE the desktop.ini it is a very nice feature, the rest can just ignore it – that’s why it was hidden in the first place.

  • Aeitawinai

    Thnx Soj for lifting dis burden off my shoulders…You great..

  • Atorres2005

    Great info, Thanks a lot

  • Tom

    What if you have two desktop.ini files. I do and suspect that confuses the windows os.

    • Schmopinions

      You have 2 desktop.ini files showing because the icons on your desktop are actually from 2 different folders: C:UsersDesktop and C:UsersPublicDesktop. Check this by right clicking on an icon and selecting Porperties. Look for “Location:” in the window that comes up. This is because there are personal icons and applications for each user and icons and applications for all the users.

      • simanos

        Thanks, that was my question too.

  • SlowEddie1

    Thank you. After suspecting my virus software had let something nasty get into my system i was close to a format. The information i found here with a simple cure saved me many hours of trouble backing up files. Again many thanks.

  • http://twitter.com/man_ana man_ana

    Thank you. I’ve been wondering about this since forever. Thanks again!

  • Ali Cobra13

    thank you !!! very good

  • Drprem

    what if i deleted this

  • Jwarner

    Now how do you get rid of B845EF76.EXE

  • cristiano

    ok well i just wanna thank joel his advice works its just help me to remove the desktop in my folders thanks again joel

  • la’ vee

    thnks soj u such a genius..

  • nichin

    cool…. thanx a lot… i was worried that it was a virus.. spreading like hell… lol

  • ashish

    Thanks dude for this valuable info.

  • Michaelangelo

    How about a tutorial on how to make USE of this device? It does have its uses and I am (I hope) about to make use of them in order to prevent Encryption on the subfolders and files within a folder that is shared by other people. It is also shared by a custom SQL database which has a tendency to encrypt the files for its own reasons from time to time turning them that familiar “green” color.

    These are not “high security items” and in many cases the encryption has been a nuisance more than a help. I was researching the use WINADVAPI when I ran across the fact that a simple text edit of the desktop.ini file would achieve my goal of preventing only that one folder and its contents from being modified by EFS.

    So far, I have not found that removing the encryption the normal way through the advanced options causes any problems,. The data it holds is only the original forms used such as pdf’s. docx’s, etc. But either Windows or the database constantly replaces the encryption requiring another removal. Since these are large folders, with many files, the time involved has become a problem for other resources that need access. Once started, it is almost impossible to interrupt as you are warned that doing so can have unpredictable results.

    If I have jumped the gun and am just running lucky so far, I would love to know before something ‘bad’ happens. Also if you have a different solution to the same problem please pss it on. My information regarding Winadvapi was that it is used to “create” the desktop.ini file in the first place and in some cases I have not found the file already created in order to modify it.

    My other option, or so I was told, was to activate the “System Attribute” for the fies in question. Supposedly marking them to be system files will prevent EFS. Since the GUI for windows only offers “Read Only” and “Hidden” this would be done (I assume) at a command prompt with the “attrib” command telling the System attribute to be active recursively down to all levels and files beneath the main folder.

    Again, having never done either due to a lack of need to do so, I don’t know if I will become a victim of the “Law of Unintended Consequences”

    PS: I never did find out how to access Winadvapi, maybe a follow up on that would be nice.

  • Mike

    Hi guys,
    I know this thread is old, but all the above advice does NOT work when it comes to desktop.ini files in all my folders. This only started, I think, recently; definitely not in XP, but certainly in 7. No matter what you set to hide or show they are still there.
    I know in themselves, they are not a major problem; until that is you use a backup program like GFI Home.
    You leave the room, and 30 seconds later, a query comes up “file exists”, Overwrite, yes or no?
    BUT, you’re out the room and you come back an hour later expecting it to have backed up your files, and it’s only at 4%, or whatever! VERY ANNOYING. Due to desktop.ini files!
    So, please, if ANYONE has the definitive answer: “How do you get rid of these desktop.ini files OTHER than the advice above”, because that is, without doubt, NOT the answer.
    Just so you know, I have 3 PC’s and all are the same, even after a fresh install!
    Regards, to all,
    Mike

  • michael

    shoul i delete all the desktop.ini in my computer/laptop ?

  • Cate

    I agree the above advice does not work, all it does is “hide” it, it’s not gone!
    In a folder redirect, the redirected folder builds a desktop.ini file in the user’s every time the user logs in on windows 7.. The folder name disappears and says “My Documents.” Now I have 25 “My documents” folders and have no idea who they belong to unless I delete the desktop.ini file in each folder. So now I have to remember to go in, search and delete the files periodically through out the day. Hiding the file does absolutely no good.
    I was looking for a batch file example that I could have in my desktop. It will help me to remember and will make it easier to delete all the Desktop.ini files in the user’s folders.

    • CC

      > I found this batch file that will delete the desktop.ini files on a network share, Hiding them does nothing and with 30 -40 folders all saying “my Documents” how do you know who’s folder is who’s?
      Hiding the file, what a waste of time.

      del /F /S /A S “D:\Shared Folders\StudentHomeAreas\desktop.ini”

      This helped me, hopefully it will help others.

  • Nina

    thanks! worked like magic!

  • john

    here’ s what you need to do. its easy. start button-control panel- appearance and personalization- folder options- show hidden files and folders-reset folder options to default…done

    • robbage

      And we have a winner. How to stop the desktop.ini file being created instead of just pretending it isn’t there. Having this stupid file magically appear in the CD/DVD buring folder is just crazy. Having 1000s of them all over the drive is insane. Worse than the MSCREATE.DIR files that old MS apps used to make everywhere.

  • amalayer

    hey mr.david kerk
    i know this thread is so old for us to post here but i have some question to be answered
    i have deleted my desktop.ini but for now, nothings happened
    what will happened on my computer on the future ?

  • Shanteran

    Thanks for the clarification of this. I’ve been having huge trouble with running a program on my hp laptop from a CD. It will not autorun and only shows desktop.ini on the cd. When clicked it opens up in wordpad just a few computer writings. My friend has an hp and it ran as soon as she inserted it into her laptop. Please help me if you could! How can i run and add this program to my computer.

  • Charles Wright

    Finally getting annoyed at the .ini files and looking for how to keep them created when I found this article. Good explanation, Mr. Kirk, although there are a couple of errors. At least on my system (which is pretty vanilla out of the box Win7), desktop.ini files are not created in every folder, nor does Windows try to rebuild ones that I delete. I would be much more interested in preventing them being created altogether, but I suppose Microsoft (aka Big Brother) knows better than I do what I should be doing with my computer.

  • charles Stephenson MD

    I cannot shed this Trojan curse. Macafee cannot clean it off as it is so prevalent as an opener for so many programs. What should I do. Is I think a Trojan ( after the wooden horse of Troy! No less )

  • Sandra Berg

    i have a windows 7 laptop computer
    after deleting a massive number of virus’s
    my computer now has a window on opening that says
    Windows can’t open file “desktop.ini.crypt”
    can it be i still have a virus still on my computer?
    can it be something was damaged, and is not fixable?
    because i still have problems in some files and it is now slower than ever.
    What’s your advise?