[Tips] How To Hide .ds_Store Files In Windows? - Information - Hackintosh Zone Jump to content
Deepak

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

Recommended Posts

Deepak    1,701

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 knows 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 filetypes 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 any more. 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 superhidden 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 hide 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 wana 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_Files.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

  • Download Hackintosh

  • Files

  • Posts

    • Saludos!   Tengo el mismo error (RAM a 667mhz), con una placa base ASUS (y mi cpu es el fx 6300).   Lograste solucionarlo?
    • Hi guys. Well, this is my second day of troubles, I touched everything, I installed max like 5 times in the same day, trying to figure out things and well. My Mac it display my graphic card on the #About this Mac tab With 2047MB ( So I guess all is right ) I installed the latest nvida drivers and on clover I activated the NvidaWeb. The problem is the resolution. Max resolution allowed is 1280 x 1024 and 800 x 600. I used to boot with nvd_drv 1 with nvd dry 0, I used to boot with all that things, and without them.  BUT No way to fix the resolution. Someone knows what-s going wrong and how can I fix it? Bdw im using iMac14,2 and OS X Sierra 10.12.3 Im connecting to the screen with DVI adapter. ( Maybe that causes the problem ) But it shows Im running 2047 MB so... idk why I can't change resolution. Thanks! ================================= SOLVED EDIT: Hi guys, in Display Resolution, I just set it in "Default for display" and after that pressing "THE WINDOWS BUTTON KEY, IN MY CASE, IDK WHAT KEY IS THAT IN MAC KEYBOARD, I THINK THE CONTROL ONE OR IDK" PRESSING that key I selected Scaled, and it appears more options and resolutions. There is a video on youtube about that called "Mac OS X Display Resolution" If someone has the same trouble.
    • Hello , i have a big problem , help me please, i have installed properly Mac OS Sierra , but now i can’t boot Windows 10, when i click on a image , which has written for example boot Windows from legacy hd3 , it blocks on an image with the Apple sign on an hard disk image, and when i enter the bios i can’t see tue hard disk in boot options, how can i add Images? Pleaseeeee
    • Im trying to install MacOSierra on Alienware 15 r2,  512ssd nvme 951 and 120gb intel sataIII samsung, i6820 hk 980m, intel 530. Ofter many attempts i solved a lot of erros during the installation, and finnaly i found out that macOs does not suport SSD. I created a patch for my ssds but now, i have this error: ACPI ERROR; and last: AppleNVMe Assert failed;  2 SSD: // Inject bogus class-code for NVMe SSD to prevent IONVMeFamily.kext from loading
      DefinitionBlock("", "SSDT", 2, "hack", "NVMe-Pcc", 0)
      {
          External(_SB.PCI0.PEG0, DeviceObj)
          Method(_SB.PCI0.PEG0._DSM, 4)
          {
              If (!Arg2) { Return (Buffer() { 0x03 } ) }
              Return(Package()
              {
                  "class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
                  "built-in", Buffer() { 0 },
              })
          }
          External(_SB.PCI0.SAT0, DeviceObj)
          Method(_SB.PCI0.SAT0._DSM, 4)
          {
              If (!Arg2) { Return (Buffer() { 0x03 } ) }
              Return(Package()
              {
                  "class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
                  "built-in", Buffer() { 0 },
              })
          }
      }
      //EOF   I did the patch in virtual machine as they instructed. but still nothing.
    • Hey!  I successfully installed macOS Sierra with the Version SierraAMD v3 on my AMD Pc.  But after setting up the PostInstall via Terminal, the OS stops booting at this line : ioconsoleusers: gioscreenlockstate 3, hs 0, bs 0, now 0, sm 0x0 Any solutions?    My System Specs: Mainboard: Asrock 970 Pro3 r2.0 Processor: AMD FX-6300 Graphics: Sapphire Radeon RX460 4GB   Thanks!
  • Download Statistics

    • Files
      842
    • Comments
      2,129
    • Reviews
      2,534

×