Open PowerShell in the Current Directory
Hold down the Shift key and right-click on a blank area within the File Explorer window of your target folder. Then select “Open in Terminal” from the context menu. This will open a PowerShell window already pointed to the current directory.

Run the Following PowerShell Command
Press Enter to execute the command. It will search for and delete all .DS_Store files recursively.
 | 
 | 
If You’re Using Command Prompt (CMD)
If you’re using CMD instead of PowerShell, you can use the following command:
⚠️ Make sure you are already in the correct target directory before running this command.
 | 
 | 
转载请注明转自:Yijile.com( https://yijile.com/en/how-use-windows11-powershell-terminal-commands-delete-all-ds_store-files/ )
    
    
    本文采用 CC BY-NC-SA 4.0方式授权。
    
    转载请注明出处和本文链接,说明是否进行修改,不得用于商业用途,使用相同方式共享。