Windows del command not working?Cygwin bash sed locks my filesMove files across computers with command line (Windows)Delete set of files using find commandHow can I delete this directory?Delete a file that could not be found by CMDWindows 10 Deleting Locked .ttf filesFind Location of File and Overwrite (Windows 10)Why does PowerShell behave differently than cmd.exe given the same command?Can delete a file through windows explorer but not through batch fileRunning python scripts in their directory with Notepad++
Why do we need a voltage divider when we get the same voltage at the output as the input?
"Fewer errors means better products" or "Fewer errors mean better products"?
What do the screens say after you are set free?
Can an alphabet for a Turing machine contain subsets of other alphabets?
Matrix condition number and reordering
Why are prop blades not shaped like household fan blades?
Pre-Greek θάλασσα "thalassa" and Turkish talaz
Plotting Chebyshev polynomials using PolarPlot and FilledCurve
How to draw twisted cuves?
Applying for mortgage when living together but only one will be on the mortgage
Move label of an angle in Tikz
Why have both: BJT and FET transistors on IC output?
How to structure presentation to avoid getting questions that will be answered later in the presentation?
Python π = 1 + (1/2) + (1/3) + (1/4) - (1/5) + (1/6) + (1/7) + (1/8) + (1/9) - (1/10) ...1748 Euler
Declaring a visitor to the UK as my "girlfriend" - effect on getting a Visitor visa?
Reasons for using monsters as bioweapons
Is the EU really banning "toxic propellants" in 2020? How is that going to work?
The grades of the students in a class
What does a number above the 'staff' mean in tablature?
How do I solve such questions on paramagnetism and ferromagnetism?
Went to a big 4 but got fired for underperformance in a year recently - Now every one thinks I'm pro - How to balance expectations?
Who's behind community AMIs on Amazon EC2?
Adding a (stair/baby) gate without facing walls
Word for pulling a punch in karate
Windows del command not working?
Cygwin bash sed locks my filesMove files across computers with command line (Windows)Delete set of files using find commandHow can I delete this directory?Delete a file that could not be found by CMDWindows 10 Deleting Locked .ttf filesFind Location of File and Overwrite (Windows 10)Why does PowerShell behave differently than cmd.exe given the same command?Can delete a file through windows explorer but not through batch fileRunning python scripts in their directory with Notepad++
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm trying to delete a large directory. I run the delete (del /f node_modules), and it appears to work, but then the directory is still there... (When I try to delete it from the file explorer, it usually gives me some flavor of "you need admin permissions" or "can't delete because file is in use" or it just takes forever.)
Here's my question: what causes the del command to appear to work, but not actually work? I'd expect some output indicating the directory wasn't deleted.
Picture of the command used, and the result Another example
windows cmd.exe
New contributor
|
show 5 more comments
I'm trying to delete a large directory. I run the delete (del /f node_modules), and it appears to work, but then the directory is still there... (When I try to delete it from the file explorer, it usually gives me some flavor of "you need admin permissions" or "can't delete because file is in use" or it just takes forever.)
Here's my question: what causes the del command to appear to work, but not actually work? I'd expect some output indicating the directory wasn't deleted.
Picture of the command used, and the result Another example
windows cmd.exe
New contributor
Does Shift+Delete work? Try skipping the Recycle Bin.
– wrecclesham
8 hours ago
Provide a screenshot of the ACL for the folder in question. If you are getting an error indicating a permission problem it sounds like you don't have the required permissions to delete it. It does not matter if you are an Administrator, if you don't currently have the required permissions, you would get a permission error. Please do not submit a comment in response to this comment. Instead, edit your question with the information required to answer your question.
– Ramhound
8 hours ago
There's no error in the output. The command appears to complete. Also thanks for that shift+delete tip, although I need to do this programmatically, as part of a script.
– JohnnyBlack
8 hours ago
@JohnnyKumpf - You said in your question there was an error. Please provide the exact error and that screenshot I requested. Your question cannot be answered without this information.
– Ramhound
8 hours ago
My goal isn't to delete it from the file explorer. I want to force a delete from the command line. I'm not sure exactly which errors produce what behavior; what I really want to know is what are the possible causes for the behavior I'm observing in the cmd: namely that the del command appears to work, but the directory is still there afterwards.
– JohnnyBlack
8 hours ago
|
show 5 more comments
I'm trying to delete a large directory. I run the delete (del /f node_modules), and it appears to work, but then the directory is still there... (When I try to delete it from the file explorer, it usually gives me some flavor of "you need admin permissions" or "can't delete because file is in use" or it just takes forever.)
Here's my question: what causes the del command to appear to work, but not actually work? I'd expect some output indicating the directory wasn't deleted.
Picture of the command used, and the result Another example
windows cmd.exe
New contributor
I'm trying to delete a large directory. I run the delete (del /f node_modules), and it appears to work, but then the directory is still there... (When I try to delete it from the file explorer, it usually gives me some flavor of "you need admin permissions" or "can't delete because file is in use" or it just takes forever.)
Here's my question: what causes the del command to appear to work, but not actually work? I'd expect some output indicating the directory wasn't deleted.
Picture of the command used, and the result Another example
windows cmd.exe
windows cmd.exe
New contributor
New contributor
edited 7 hours ago
JohnnyBlack
New contributor
asked 8 hours ago
JohnnyBlackJohnnyBlack
112 bronze badges
112 bronze badges
New contributor
New contributor
Does Shift+Delete work? Try skipping the Recycle Bin.
– wrecclesham
8 hours ago
Provide a screenshot of the ACL for the folder in question. If you are getting an error indicating a permission problem it sounds like you don't have the required permissions to delete it. It does not matter if you are an Administrator, if you don't currently have the required permissions, you would get a permission error. Please do not submit a comment in response to this comment. Instead, edit your question with the information required to answer your question.
– Ramhound
8 hours ago
There's no error in the output. The command appears to complete. Also thanks for that shift+delete tip, although I need to do this programmatically, as part of a script.
– JohnnyBlack
8 hours ago
@JohnnyKumpf - You said in your question there was an error. Please provide the exact error and that screenshot I requested. Your question cannot be answered without this information.
– Ramhound
8 hours ago
My goal isn't to delete it from the file explorer. I want to force a delete from the command line. I'm not sure exactly which errors produce what behavior; what I really want to know is what are the possible causes for the behavior I'm observing in the cmd: namely that the del command appears to work, but the directory is still there afterwards.
– JohnnyBlack
8 hours ago
|
show 5 more comments
Does Shift+Delete work? Try skipping the Recycle Bin.
– wrecclesham
8 hours ago
Provide a screenshot of the ACL for the folder in question. If you are getting an error indicating a permission problem it sounds like you don't have the required permissions to delete it. It does not matter if you are an Administrator, if you don't currently have the required permissions, you would get a permission error. Please do not submit a comment in response to this comment. Instead, edit your question with the information required to answer your question.
– Ramhound
8 hours ago
There's no error in the output. The command appears to complete. Also thanks for that shift+delete tip, although I need to do this programmatically, as part of a script.
– JohnnyBlack
8 hours ago
@JohnnyKumpf - You said in your question there was an error. Please provide the exact error and that screenshot I requested. Your question cannot be answered without this information.
– Ramhound
8 hours ago
My goal isn't to delete it from the file explorer. I want to force a delete from the command line. I'm not sure exactly which errors produce what behavior; what I really want to know is what are the possible causes for the behavior I'm observing in the cmd: namely that the del command appears to work, but the directory is still there afterwards.
– JohnnyBlack
8 hours ago
Does Shift+Delete work? Try skipping the Recycle Bin.
– wrecclesham
8 hours ago
Does Shift+Delete work? Try skipping the Recycle Bin.
– wrecclesham
8 hours ago
Provide a screenshot of the ACL for the folder in question. If you are getting an error indicating a permission problem it sounds like you don't have the required permissions to delete it. It does not matter if you are an Administrator, if you don't currently have the required permissions, you would get a permission error. Please do not submit a comment in response to this comment. Instead, edit your question with the information required to answer your question.
– Ramhound
8 hours ago
Provide a screenshot of the ACL for the folder in question. If you are getting an error indicating a permission problem it sounds like you don't have the required permissions to delete it. It does not matter if you are an Administrator, if you don't currently have the required permissions, you would get a permission error. Please do not submit a comment in response to this comment. Instead, edit your question with the information required to answer your question.
– Ramhound
8 hours ago
There's no error in the output. The command appears to complete. Also thanks for that shift+delete tip, although I need to do this programmatically, as part of a script.
– JohnnyBlack
8 hours ago
There's no error in the output. The command appears to complete. Also thanks for that shift+delete tip, although I need to do this programmatically, as part of a script.
– JohnnyBlack
8 hours ago
@JohnnyKumpf - You said in your question there was an error. Please provide the exact error and that screenshot I requested. Your question cannot be answered without this information.
– Ramhound
8 hours ago
@JohnnyKumpf - You said in your question there was an error. Please provide the exact error and that screenshot I requested. Your question cannot be answered without this information.
– Ramhound
8 hours ago
My goal isn't to delete it from the file explorer. I want to force a delete from the command line. I'm not sure exactly which errors produce what behavior; what I really want to know is what are the possible causes for the behavior I'm observing in the cmd: namely that the del command appears to work, but the directory is still there afterwards.
– JohnnyBlack
8 hours ago
My goal isn't to delete it from the file explorer. I want to force a delete from the command line. I'm not sure exactly which errors produce what behavior; what I really want to know is what are the possible causes for the behavior I'm observing in the cmd: namely that the del command appears to work, but the directory is still there afterwards.
– JohnnyBlack
8 hours ago
|
show 5 more comments
2 Answers
2
active
oldest
votes
If I didn't have appropriate permissions, the cmd doesn't throw an access denied or something?
That's not how del
is designed to work. If files are deleted, then del
will inform you. If no files are deleted then del
is silent.
Normally DEL will display a list of the files deleted, if Command Extensions are disabled; it will instead display a list of any files it cannot find.
Source Del - Delete Files - Windows CMD - SS64.com
If no files are deleted then you do not have the appropriate permissions to remove them.
I'd expect some output indicating the directory wasn't deleted.
If you use del
with a directory name then it will delete the files in the directory. The directory specified is not deleted.
If a folder name is given instead of a file, all files in the folder will be deleted, but the folder itself will not be removed.
Source Del - Delete Files - Windows CMD - SS64.com
To delete both directories and the files and subdirectories use rd
:
Remove (or Delete) a Directory.
Syntax
RD pathname
RD /S pathname
RD /S /Q pathname
/S
: Delete all files and subfolders in addition to the folder
itself. Use this to remove an entire folder tree.
Source - RD - Remove Directory - Windows CMD - SS64.com
add a comment |
del
will delete all contents, but (even with /f
or /s
) it never removes the directories themselves; that's just how it was written.
Use rmdir /s
instead:
rd/s/q node_modules
when I cd into the directory, all the files are still there
– JohnnyBlack
7 hours ago
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
);
);
JohnnyBlack is a new contributor. Be nice, and check out our Code of Conduct.
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%2f1467361%2fwindows-del-command-not-working%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If I didn't have appropriate permissions, the cmd doesn't throw an access denied or something?
That's not how del
is designed to work. If files are deleted, then del
will inform you. If no files are deleted then del
is silent.
Normally DEL will display a list of the files deleted, if Command Extensions are disabled; it will instead display a list of any files it cannot find.
Source Del - Delete Files - Windows CMD - SS64.com
If no files are deleted then you do not have the appropriate permissions to remove them.
I'd expect some output indicating the directory wasn't deleted.
If you use del
with a directory name then it will delete the files in the directory. The directory specified is not deleted.
If a folder name is given instead of a file, all files in the folder will be deleted, but the folder itself will not be removed.
Source Del - Delete Files - Windows CMD - SS64.com
To delete both directories and the files and subdirectories use rd
:
Remove (or Delete) a Directory.
Syntax
RD pathname
RD /S pathname
RD /S /Q pathname
/S
: Delete all files and subfolders in addition to the folder
itself. Use this to remove an entire folder tree.
Source - RD - Remove Directory - Windows CMD - SS64.com
add a comment |
If I didn't have appropriate permissions, the cmd doesn't throw an access denied or something?
That's not how del
is designed to work. If files are deleted, then del
will inform you. If no files are deleted then del
is silent.
Normally DEL will display a list of the files deleted, if Command Extensions are disabled; it will instead display a list of any files it cannot find.
Source Del - Delete Files - Windows CMD - SS64.com
If no files are deleted then you do not have the appropriate permissions to remove them.
I'd expect some output indicating the directory wasn't deleted.
If you use del
with a directory name then it will delete the files in the directory. The directory specified is not deleted.
If a folder name is given instead of a file, all files in the folder will be deleted, but the folder itself will not be removed.
Source Del - Delete Files - Windows CMD - SS64.com
To delete both directories and the files and subdirectories use rd
:
Remove (or Delete) a Directory.
Syntax
RD pathname
RD /S pathname
RD /S /Q pathname
/S
: Delete all files and subfolders in addition to the folder
itself. Use this to remove an entire folder tree.
Source - RD - Remove Directory - Windows CMD - SS64.com
add a comment |
If I didn't have appropriate permissions, the cmd doesn't throw an access denied or something?
That's not how del
is designed to work. If files are deleted, then del
will inform you. If no files are deleted then del
is silent.
Normally DEL will display a list of the files deleted, if Command Extensions are disabled; it will instead display a list of any files it cannot find.
Source Del - Delete Files - Windows CMD - SS64.com
If no files are deleted then you do not have the appropriate permissions to remove them.
I'd expect some output indicating the directory wasn't deleted.
If you use del
with a directory name then it will delete the files in the directory. The directory specified is not deleted.
If a folder name is given instead of a file, all files in the folder will be deleted, but the folder itself will not be removed.
Source Del - Delete Files - Windows CMD - SS64.com
To delete both directories and the files and subdirectories use rd
:
Remove (or Delete) a Directory.
Syntax
RD pathname
RD /S pathname
RD /S /Q pathname
/S
: Delete all files and subfolders in addition to the folder
itself. Use this to remove an entire folder tree.
Source - RD - Remove Directory - Windows CMD - SS64.com
If I didn't have appropriate permissions, the cmd doesn't throw an access denied or something?
That's not how del
is designed to work. If files are deleted, then del
will inform you. If no files are deleted then del
is silent.
Normally DEL will display a list of the files deleted, if Command Extensions are disabled; it will instead display a list of any files it cannot find.
Source Del - Delete Files - Windows CMD - SS64.com
If no files are deleted then you do not have the appropriate permissions to remove them.
I'd expect some output indicating the directory wasn't deleted.
If you use del
with a directory name then it will delete the files in the directory. The directory specified is not deleted.
If a folder name is given instead of a file, all files in the folder will be deleted, but the folder itself will not be removed.
Source Del - Delete Files - Windows CMD - SS64.com
To delete both directories and the files and subdirectories use rd
:
Remove (or Delete) a Directory.
Syntax
RD pathname
RD /S pathname
RD /S /Q pathname
/S
: Delete all files and subfolders in addition to the folder
itself. Use this to remove an entire folder tree.
Source - RD - Remove Directory - Windows CMD - SS64.com
edited 6 hours ago
answered 6 hours ago
DavidPostill♦DavidPostill
113k27 gold badges250 silver badges283 bronze badges
113k27 gold badges250 silver badges283 bronze badges
add a comment |
add a comment |
del
will delete all contents, but (even with /f
or /s
) it never removes the directories themselves; that's just how it was written.
Use rmdir /s
instead:
rd/s/q node_modules
when I cd into the directory, all the files are still there
– JohnnyBlack
7 hours ago
add a comment |
del
will delete all contents, but (even with /f
or /s
) it never removes the directories themselves; that's just how it was written.
Use rmdir /s
instead:
rd/s/q node_modules
when I cd into the directory, all the files are still there
– JohnnyBlack
7 hours ago
add a comment |
del
will delete all contents, but (even with /f
or /s
) it never removes the directories themselves; that's just how it was written.
Use rmdir /s
instead:
rd/s/q node_modules
del
will delete all contents, but (even with /f
or /s
) it never removes the directories themselves; that's just how it was written.
Use rmdir /s
instead:
rd/s/q node_modules
answered 8 hours ago
grawitygrawity
258k38 gold badges542 silver badges607 bronze badges
258k38 gold badges542 silver badges607 bronze badges
when I cd into the directory, all the files are still there
– JohnnyBlack
7 hours ago
add a comment |
when I cd into the directory, all the files are still there
– JohnnyBlack
7 hours ago
when I cd into the directory, all the files are still there
– JohnnyBlack
7 hours ago
when I cd into the directory, all the files are still there
– JohnnyBlack
7 hours ago
add a comment |
JohnnyBlack is a new contributor. Be nice, and check out our Code of Conduct.
JohnnyBlack is a new contributor. Be nice, and check out our Code of Conduct.
JohnnyBlack is a new contributor. Be nice, and check out our Code of Conduct.
JohnnyBlack is a new contributor. Be nice, and check out our Code of Conduct.
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%2f1467361%2fwindows-del-command-not-working%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
Does Shift+Delete work? Try skipping the Recycle Bin.
– wrecclesham
8 hours ago
Provide a screenshot of the ACL for the folder in question. If you are getting an error indicating a permission problem it sounds like you don't have the required permissions to delete it. It does not matter if you are an Administrator, if you don't currently have the required permissions, you would get a permission error. Please do not submit a comment in response to this comment. Instead, edit your question with the information required to answer your question.
– Ramhound
8 hours ago
There's no error in the output. The command appears to complete. Also thanks for that shift+delete tip, although I need to do this programmatically, as part of a script.
– JohnnyBlack
8 hours ago
@JohnnyKumpf - You said in your question there was an error. Please provide the exact error and that screenshot I requested. Your question cannot be answered without this information.
– Ramhound
8 hours ago
My goal isn't to delete it from the file explorer. I want to force a delete from the command line. I'm not sure exactly which errors produce what behavior; what I really want to know is what are the possible causes for the behavior I'm observing in the cmd: namely that the del command appears to work, but the directory is still there afterwards.
– JohnnyBlack
8 hours ago