Jump to content
Deepak

[Tips] How To Hide .ds_Store Files In Windows?

Recommended Posts

OSX like other Unix systems creates a number of metadata files for things like fast indexing. The first character of these files and folders is always a period ie ".DS_Store" or "._MyDoc.doc" and from this file naming convention, OSX from the know to hide these files so they don't clutter up Finder.
However, Windows doesn't automatically hide these files and they are created whenever OSX browses a Windows drive with read permissions ie. through a networked drive with samba or using Macfuse with ntfs3g.
You can tell OSX not to create these files but they are created for a reason and I would prefer to have them on my OSX drive. This tutorial will show you how to quickly and simply add an extra layer of invisibility to these files in Windows so that they will not show unless you check the "Hide protected operating system files" option in Explorer, an option I am content to leave on unless needed.
 
1. Create a new text document anywhere. Rename it to something suitable like "Hide DS_Store Files.bat" any name is fine as long as you change the extension from .txt to .bat If you get a prompt about changing thfile extension choose 'yes' to rename it.
2. Right click on the file and select "Edit"

3. Paste the following code into the text editor, save and exit. If your windows installation is on a drive other than C: then replace C: with the appropriate drive name.

Attrib +h +s C:*.DS_Store /s   Exit

If you have multiple drives you would like to hide files on then create an entry for each. Likewise, if there are other file types you would like to hide, add entries for each:

Attrib +h +s C:*.DS_Store /s Attrib +h +s D:*.DS_Store /s Attrib +h +s C:*._* /s Attrib +h +s D:*._* /s   Exit

(WARNING* if you do something silly like "Attrib +h +s C:*.* /s" don't complain to me when all of your files disappear *WARNING)
 
4. Double click on the .bat file to run the script, a command window will pop up. It might look like it isn't doing anything or has crashed, but don't worry. The script is searching every file on your C: drive for .DS_Store files to hide, this can take a long time.
5. New .DS_Store files might be created from time to time that won't be hidden anymore. When this happens, just run the script again. 

If you messed up and need to see the files you hid, in the Explorer menu bar, go to Tools - > Folder Options... in the box that pops up, click on the "View" tab and under the "Advanced Options" menu make sure the box next to "Hide protected operating system files(recommended)" is unchecked.


So what did we do?
"attrib" runs the DOS program attrib.exe which is used for changing file and folder attributes much in the same way that file permissions work in OSX.

This batch script tags all the .DS_Store files on the designated drive(s) with the Hidden "+h" and System "+s" attributes. This categorizes them as super hidden files and they will not show up in explorer or searches like regulahidden files and folders that have the "+h" attribute but are missing "+s".

* acts as a wildcard so "C:*._*" will work on "C:._MyDoc.doc" "C:._YourDoc.doc" "C:DoNotHide._" "C:DoNotHide._MyDoc.doc" etc...
 
the "/s" command at the end tells the script to perform the attribute change on all the subfolders in C: so it will look in "C:", "C:Windows", "C:My Documents", "C:Program Files", etc. and all the folders in those folders. In effect, it checks every single file and folder on the C: drive. 
 
Another Method :::::
 
 
I create a batch file that hides all mac cache files, in windows drives.( attached file.)

Attrib +h +s *.DS_Store /sAttrib +h +s ._.* /sAttrib +h +s *.fuse* /sAttrib +h +s *.donotpresent /sAttrib +h +s *.fseventsd /sAttrib +h +s .fseventsdAttrib +h +s .TrashesAttrib +h +s .TemporaryItemsAttrib +h +s *.TemporaryItems /s

if you wanna do manually, create a text file, copy this commands, paste into the text file.
save as " HideExtensions.bat " .
run this batch file in every hard disk drive partitions.

for example, copy this file in c: partition , and run it for hide files on drive c:
for partition d: , run it on this partition , and for all partitions.

 
GOOG LUCK !!!!!
 
Best Regards
Deepak

Hide_Mac_CacheFiles.zip

  • Like 7

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Contribute

    This is a free website, We'll try to keep it that way, Your donations and disabling Adblock makes this site going on, Thanks for understanding.



    $22.30 of $200.00 goal reached.
    Donate Now
  • Download Hackintosh

  • Posts

    • I get this message no matter what I do, I've tried changing my SMBIOS to a newer model to no avail. Anyone no how to get the second install boot to work?
    • This is my first time doing Hackintosh. I've several other machines running Mac using UniBeast and Multi beast. I wanted to try Hackintosh Vanilla. So far, no luck. I followed the Guide and MacPwn Mojave Guide. 
    • Hello! I wanted to install MacOS High Sierra, but the SSD does not appear in Disk Manager. I have a Samsung Pro 840 250GB. Is there a Driver for Intel Gigabit 82579LM Network LAN for MacOS High Sierra?
    • This is my very first post and have looked around the forums to my question but I wasn't able to find the exact specifics that I need. This is my very first windows/mac dual boot project. I chose to attempt high sierra and I hope I am posting in the correct area. High Sierra seemed to be the newest that is possibly more stable than Mojave so I chose that. I'm reaching out to the more advanced builders and experienced people. I'm currently running Win 10 as of now and bought a separate SSD to install a macOS on. Before I invest time and energy into this. I'm wanting to get the best recommendations on what OS I should choose , if my hardware will be up for the task and my best plan of attack. I'll be honest I'm not ready to bang my head on the keyboard for hours. I've been there and done that.  My hardware was some of the best at its time in 2011 and I'm not 100% confident it will work with a more up to date macOS I'm also concerned about drivers for my GPU.  All input is welcomed   Here are my current specs:   CPU
          Intel Core i7 2600 @ 3.40GHz    28 °C
          Sandy Bridge 32nm Technology
      RAM
          8.00GB Dual-Channel DDR3 @ 668MHz (9-9-9-24)
      Motherboard
          ASUSTeK Computer INC. CG8350 (LGA1155)    26 °C
      Graphics
          NS-24E730A12 (1842x1036@60Hz)
          1023MB NVIDIA GeForce GTX 560 Ti (NVIDIA)    31 °C
      Storage
          3726GB Western Digital WDC WD40EFRX-68N32N0 ATA Device (SATA )    25 °C
          111GB PNY CS900 120GB SSD ATA Device (SATA (SSD))    33 °C
          931GB Seagate ST31000528AS ATA Device (SATA )    30 °C
          3726GB Western Digital WDC WD40EFRX-68N32N0 ATA Device (SATA )    27 °C
      Optical Drives
          HL-DT-ST BD-RE BH12LS35 ATA Device
      Audio
          NVIDIA High Definition Audio 
    • Hi! Everything seems to install ok, but after reboot, it just says Disk Booth Failure Insert system disk and press enter.. Don't have a clue about what can I do!   Francisco
  • Download Statistics

    • Files
      855
    • Comments
      2,148
    • Reviews
      2,612

    Latest File
    By Niresh

    183    2

×