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;








2















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










share|improve this question









New contributor



JohnnyBlack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • 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


















2















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










share|improve this question









New contributor



JohnnyBlack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • 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














2












2








2








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










share|improve this question









New contributor



JohnnyBlack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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






share|improve this question









New contributor



JohnnyBlack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



JohnnyBlack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 7 hours ago







JohnnyBlack













New contributor



JohnnyBlack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 8 hours ago









JohnnyBlackJohnnyBlack

112 bronze badges




112 bronze badges




New contributor



JohnnyBlack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




JohnnyBlack is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

















  • 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











  • 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











2 Answers
2






active

oldest

votes


















2














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






share|improve this answer


































    0














    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





    share|improve this answer

























    • when I cd into the directory, all the files are still there

      – JohnnyBlack
      7 hours ago













    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.









    draft saved

    draft discarded


















    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









    2














    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






    share|improve this answer































      2














      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






      share|improve this answer





























        2












        2








        2







        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






        share|improve this answer















        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







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 6 hours ago

























        answered 6 hours ago









        DavidPostillDavidPostill

        113k27 gold badges250 silver badges283 bronze badges




        113k27 gold badges250 silver badges283 bronze badges


























            0














            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





            share|improve this answer

























            • when I cd into the directory, all the files are still there

              – JohnnyBlack
              7 hours ago















            0














            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





            share|improve this answer

























            • when I cd into the directory, all the files are still there

              – JohnnyBlack
              7 hours ago













            0












            0








            0







            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





            share|improve this answer













            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






            share|improve this answer












            share|improve this answer



            share|improve this answer










            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

















            • 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










            JohnnyBlack is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

            Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

            199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單