Windows del command not working?Cygwin bash sed locks my filesMove files across computers with command line...

A conjectural trigonometric identity

What's the proper way of indicating that a car has reached its destination during a dialogue?

Who's behind community AMIs on Amazon EC2?

Overprovisioning SSD on ubuntu. How? Ubuntu 19.04 Samsung SSD 860

Python π = 1 + (1/2) + (1/3) + (1/4) - (1/5) + (1/6) + (1/7) + (1/8) + (1/9) - (1/10) ...1748 Euler

δόλος = deceit in John 1:47

Is the un-detonated globe of Otiluke's Freezing Sphere magical?

Can Otiluke's Freezing Spheres be stockpiled?

Can I say "Gesundheit" if someone is coughing?

What's the term for a group of people who enjoy literary works?

Does KNN have a loss function?

What is time? Does it flow linearly? If so, how are we sure?

Why are Star Wars Rebel Alliance ships named after letters from the Latin alphabet?

How do I solve such questions on paramagnetism and ferromagnetism?

Why do we need a voltage divider when we get the same voltage at the output as the input?

Is it moral to remove/hide certain parts of a photo, as a photographer?

Need help identifying how to open this bolt/screw

Heinlein story regarding suspended animation and reading newspapers?

Backpacking with incontinence

How did Biff return to 2015 from 1955 without a lightning strike?

speaker impedence

Is this popular optical illusion made of a grey-scale image with coloured lines?

How were x-ray diffraction patterns deciphered before computers?

Could flaps be raised upward to serve as spoilers / lift dumpers?



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

            Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

            Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

            Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...