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.

50 Responses to “Windows 7: What is the Desktop.ini file and How Can I Remove It?”

  1. June 29, 2010 at 5:18 am, Jiltedone said:

    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.


    • September 21, 2010 at 5:55 pm, joel said:

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


      • November 12, 2010 at 10:24 pm, Dshultz said:

        Nice job


      • November 18, 2010 at 5:39 pm, Timchuks87 said:

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


        • May 12, 2011 at 8:28 pm, reza said:

          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 ;)


          • January 28, 2013 at 9:19 am, Me said:

            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

      • November 23, 2010 at 4:56 pm, Terlisner said:

        thanks to joel


      • February 07, 2011 at 5:09 am, Ariel Vergantinos Tapere said:

        tanks bro…it really works…good job…


      • February 23, 2011 at 9:13 am, Rotan Benaia said:

        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… :)


      • March 29, 2011 at 8:01 pm, Yolanda K. said:

        Thank you…worked perfectly.


    • January 21, 2011 at 9:40 pm, critters52 said:

      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.


  2. November 10, 2010 at 5:43 pm, Soj said:

    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.


    • January 08, 2011 at 10:34 am, Sabih Star said:

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


    • January 29, 2011 at 10:49 pm, Andrew said:

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


    • February 16, 2011 at 1:51 pm, Fbashyam said:

      Thank you and good wishse


    • March 10, 2011 at 4:45 am, johnrobert said:

      thank you soj..


    • March 19, 2011 at 11:05 pm, Barc777 said:

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


      • March 19, 2011 at 11:11 pm, Barc777 said:

        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!


      • March 19, 2011 at 11:15 pm, Barc777 said:

        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!)


  3. December 16, 2010 at 5:47 pm, Jtannercc33914 said:

    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.


  4. December 18, 2010 at 2:40 pm, Jamilu said:

    Yeah it work for me.Thanks lol


  5. December 21, 2010 at 12:14 pm, Idiotsrus said:

    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.


    • July 24, 2012 at 6:35 pm, Paul said:

      > 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.


  6. December 24, 2010 at 12:53 am, Aeitawinai said:

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


  7. December 29, 2010 at 12:47 am, Atorres2005 said:

    Great info, Thanks a lot


  8. January 09, 2011 at 6:53 pm, Tom said:

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


    • February 04, 2011 at 12:21 pm, Schmopinions said:

      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.


      • November 26, 2012 at 9:40 pm, simanos said:

        Thanks, that was my question too.


  9. March 01, 2011 at 11:45 am, SlowEddie1 said:

    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.


  10. March 05, 2011 at 5:53 am, man_ana said:

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


  11. March 30, 2011 at 11:48 am, Ali Cobra13 said:

    thank you !!! very good


  12. May 10, 2011 at 8:12 am, Drprem said:

    what if i deleted this


  13. August 03, 2011 at 7:13 pm, Jwarner said:

    Now how do you get rid of B845EF76.EXE


  14. August 22, 2011 at 12:12 pm, cristiano said:

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


  15. January 27, 2012 at 8:10 am, la' vee said:

    thnks soj u such a genius..


  16. February 08, 2012 at 9:19 am, nichin said:

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


  17. May 09, 2012 at 2:32 am, ashish said:

    Thanks dude for this valuable info.


  18. July 02, 2012 at 2:17 pm, Michaelangelo said:

    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.


  19. July 29, 2012 at 2:11 pm, Mike said:

    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,


  20. August 02, 2012 at 1:28 pm, michael said:

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


  21. August 23, 2012 at 8:45 pm, Cate said:

    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.


    • October 03, 2012 at 10:55 pm, CC said:

      > 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.


  22. August 27, 2012 at 12:40 pm, Nina said:

    thanks! worked like magic!


  23. December 13, 2012 at 7:06 pm, john said:

    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


    • April 02, 2013 at 9:32 am, robbage said:

      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.


  24. December 20, 2012 at 12:17 pm, amalayer said:

    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 ?


  25. February 03, 2013 at 4:59 pm, Shanteran said:

    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.


  26. March 17, 2013 at 9:55 am, Charles Wright said:

    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.


  27. September 18, 2013 at 12:33 pm, charles Stephenson MD said:

    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 )


  28. March 17, 2014 at 10:09 am, Sandra Berg said:

    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?


Leave a Reply