Similar to this question, I want to get rid of all hidden Mac .DS_Store
files on a windows machine. Browsing to the folder and manually deleting them one by one is cumbersome and very time consuming. The following command does delete a .DS_Store
file, but not recursively:
del .DS_Store
To delete all DS_Store files on the desktop, enter cd desktop and press Enter. To delete all DS_Store files on other folders, type cd followed by a space, drag the folder icon to Terminal, and press Enter. Type the following command and hit Enter. find . –name '.DS_Store' –type f –delete Select OK. Open Finder > Applications > Utilities > Terminal.
You can see the ds_store from archived files received from other Mac users. The ds_store does not cause any harm on the device however, there can be some inconveniences particularly in file operations like file copying.
To delete a corrupted .DS_Store file, you will need to use Terminal.app. Note: You must be logged into macOS as an administrator. Open a new Finder window and navigate to the Applications folder on the left.
Although you can't stop macOS from generating the DS_Store files on local drives, you can disable the automatic creation of DS_Store files on shared network drives by following these steps: Open Finder > Applications > Utilities > Terminal. Execute the following command: defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Run the following command in the folder where you want to remove the .DS_Store
files. It will delete them recursively.
del /s /q /f /a .DS_STORE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With