Windows10: how do delete .DS_STORE files via powershell/command prompt?
so I searched the net for various ways to delete OS X files (.DS_STORE and ._.DS_STORE) files on my Windows machine.
Things I've tried (1st and 2nd options where things I found in the internet)
first option - using powershell + dir/remove-item combo
dir D:my-stuff -include "._*",".DS*" -Recurse -Force | remove-item
It finds the files but gives an error
+ FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
remove-item : Cannot remove item D:my-stuff._.DS_Store: You do not have sufficient access rights to perform this operation.
I then went to my drive properties and then security to give my user full control. Still the same results.
second option - using powershell + get-childitem/remove-item combo
Get-ChildItem -recurse -filter .DS_STORE | Remove-Item -WhatIf
which didn't result in any files being found.
Also tried
Get-ChildItem -recurse -filter .DS_STORE
and still didn't any files
third option - using command prompt/del command this time
D:>del /f /s .DS_STORE ._*
Could Not Find D:.DS_STORE
windows windows-10
add a comment |
so I searched the net for various ways to delete OS X files (.DS_STORE and ._.DS_STORE) files on my Windows machine.
Things I've tried (1st and 2nd options where things I found in the internet)
first option - using powershell + dir/remove-item combo
dir D:my-stuff -include "._*",".DS*" -Recurse -Force | remove-item
It finds the files but gives an error
+ FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
remove-item : Cannot remove item D:my-stuff._.DS_Store: You do not have sufficient access rights to perform this operation.
I then went to my drive properties and then security to give my user full control. Still the same results.
second option - using powershell + get-childitem/remove-item combo
Get-ChildItem -recurse -filter .DS_STORE | Remove-Item -WhatIf
which didn't result in any files being found.
Also tried
Get-ChildItem -recurse -filter .DS_STORE
and still didn't any files
third option - using command prompt/del command this time
D:>del /f /s .DS_STORE ._*
Could Not Find D:.DS_STORE
windows windows-10
seems like on the third option your not in the dir with the.DS_STOREfile
– Arduino_Sentinel
Jun 17 '17 at 1:22
@Arduino_Sentinel I know but I want to do the find in the root folder and delete the file recursively
– mrjayviper
Jun 17 '17 at 1:26
of course the command will only work on the root folder where the file is and not otherwise
– Arduino_Sentinel
Jun 17 '17 at 1:29
add a comment |
so I searched the net for various ways to delete OS X files (.DS_STORE and ._.DS_STORE) files on my Windows machine.
Things I've tried (1st and 2nd options where things I found in the internet)
first option - using powershell + dir/remove-item combo
dir D:my-stuff -include "._*",".DS*" -Recurse -Force | remove-item
It finds the files but gives an error
+ FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
remove-item : Cannot remove item D:my-stuff._.DS_Store: You do not have sufficient access rights to perform this operation.
I then went to my drive properties and then security to give my user full control. Still the same results.
second option - using powershell + get-childitem/remove-item combo
Get-ChildItem -recurse -filter .DS_STORE | Remove-Item -WhatIf
which didn't result in any files being found.
Also tried
Get-ChildItem -recurse -filter .DS_STORE
and still didn't any files
third option - using command prompt/del command this time
D:>del /f /s .DS_STORE ._*
Could Not Find D:.DS_STORE
windows windows-10
so I searched the net for various ways to delete OS X files (.DS_STORE and ._.DS_STORE) files on my Windows machine.
Things I've tried (1st and 2nd options where things I found in the internet)
first option - using powershell + dir/remove-item combo
dir D:my-stuff -include "._*",".DS*" -Recurse -Force | remove-item
It finds the files but gives an error
+ FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
remove-item : Cannot remove item D:my-stuff._.DS_Store: You do not have sufficient access rights to perform this operation.
I then went to my drive properties and then security to give my user full control. Still the same results.
second option - using powershell + get-childitem/remove-item combo
Get-ChildItem -recurse -filter .DS_STORE | Remove-Item -WhatIf
which didn't result in any files being found.
Also tried
Get-ChildItem -recurse -filter .DS_STORE
and still didn't any files
third option - using command prompt/del command this time
D:>del /f /s .DS_STORE ._*
Could Not Find D:.DS_STORE
windows windows-10
windows windows-10
edited Jun 17 '17 at 1:12
mrjayviper
asked Jun 17 '17 at 1:02
mrjayvipermrjayviper
2902720
2902720
seems like on the third option your not in the dir with the.DS_STOREfile
– Arduino_Sentinel
Jun 17 '17 at 1:22
@Arduino_Sentinel I know but I want to do the find in the root folder and delete the file recursively
– mrjayviper
Jun 17 '17 at 1:26
of course the command will only work on the root folder where the file is and not otherwise
– Arduino_Sentinel
Jun 17 '17 at 1:29
add a comment |
seems like on the third option your not in the dir with the.DS_STOREfile
– Arduino_Sentinel
Jun 17 '17 at 1:22
@Arduino_Sentinel I know but I want to do the find in the root folder and delete the file recursively
– mrjayviper
Jun 17 '17 at 1:26
of course the command will only work on the root folder where the file is and not otherwise
– Arduino_Sentinel
Jun 17 '17 at 1:29
seems like on the third option your not in the dir with the
.DS_STORE file– Arduino_Sentinel
Jun 17 '17 at 1:22
seems like on the third option your not in the dir with the
.DS_STORE file– Arduino_Sentinel
Jun 17 '17 at 1:22
@Arduino_Sentinel I know but I want to do the find in the root folder and delete the file recursively
– mrjayviper
Jun 17 '17 at 1:26
@Arduino_Sentinel I know but I want to do the find in the root folder and delete the file recursively
– mrjayviper
Jun 17 '17 at 1:26
of course the command will only work on the root folder where the file is and not otherwise
– Arduino_Sentinel
Jun 17 '17 at 1:29
of course the command will only work on the root folder where the file is and not otherwise
– Arduino_Sentinel
Jun 17 '17 at 1:29
add a comment |
1 Answer
1
active
oldest
votes
First cd to the folder where there is .DS_STORE file
cd D:my-stuff
Then run below command for deleting file called .DS_Store recursively
del /s /q /f /a .DS_STORE
or this one below for deleting other hidden file matching the wildcard ._ which for some reason you should be carefull since there might be other files you gonna need that match the wilcard
del /s /q /f /a:h ._*
Confirming this is the easiest way to achieve the job
– Eagle
Dec 19 '18 at 10:40
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1220151%2fwindows10-how-do-delete-ds-store-files-via-powershell-command-prompt%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
First cd to the folder where there is .DS_STORE file
cd D:my-stuff
Then run below command for deleting file called .DS_Store recursively
del /s /q /f /a .DS_STORE
or this one below for deleting other hidden file matching the wildcard ._ which for some reason you should be carefull since there might be other files you gonna need that match the wilcard
del /s /q /f /a:h ._*
Confirming this is the easiest way to achieve the job
– Eagle
Dec 19 '18 at 10:40
add a comment |
First cd to the folder where there is .DS_STORE file
cd D:my-stuff
Then run below command for deleting file called .DS_Store recursively
del /s /q /f /a .DS_STORE
or this one below for deleting other hidden file matching the wildcard ._ which for some reason you should be carefull since there might be other files you gonna need that match the wilcard
del /s /q /f /a:h ._*
Confirming this is the easiest way to achieve the job
– Eagle
Dec 19 '18 at 10:40
add a comment |
First cd to the folder where there is .DS_STORE file
cd D:my-stuff
Then run below command for deleting file called .DS_Store recursively
del /s /q /f /a .DS_STORE
or this one below for deleting other hidden file matching the wildcard ._ which for some reason you should be carefull since there might be other files you gonna need that match the wilcard
del /s /q /f /a:h ._*
First cd to the folder where there is .DS_STORE file
cd D:my-stuff
Then run below command for deleting file called .DS_Store recursively
del /s /q /f /a .DS_STORE
or this one below for deleting other hidden file matching the wildcard ._ which for some reason you should be carefull since there might be other files you gonna need that match the wilcard
del /s /q /f /a:h ._*
edited Jun 17 '17 at 1:40
answered Jun 17 '17 at 1:26
Arduino_SentinelArduino_Sentinel
1313
1313
Confirming this is the easiest way to achieve the job
– Eagle
Dec 19 '18 at 10:40
add a comment |
Confirming this is the easiest way to achieve the job
– Eagle
Dec 19 '18 at 10:40
Confirming this is the easiest way to achieve the job
– Eagle
Dec 19 '18 at 10:40
Confirming this is the easiest way to achieve the job
– Eagle
Dec 19 '18 at 10:40
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1220151%2fwindows10-how-do-delete-ds-store-files-via-powershell-command-prompt%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
seems like on the third option your not in the dir with the
.DS_STOREfile– Arduino_Sentinel
Jun 17 '17 at 1:22
@Arduino_Sentinel I know but I want to do the find in the root folder and delete the file recursively
– mrjayviper
Jun 17 '17 at 1:26
of course the command will only work on the root folder where the file is and not otherwise
– Arduino_Sentinel
Jun 17 '17 at 1:29