Windows Command Line

Discussion in 'Windows 10' started by blueriver649, Dec 29, 2020.

Tags:
  1. blueriver649

    blueriver649 MDL Novice

    Sep 6, 2012
    48
    3
    0
    Hi there,


    How do I use windows command line to delete all specific extension(.SRT) in Directory or folder. Thanks.
     
  2. cuteee

    cuteee MDL Guru

    Oct 13, 2012
    5,761
    998
    180
    Code:
    del *.SRT
     
  3. strotee

    strotee MDL Member

    Jan 30, 2011
    229
    205
    10
  4. blueriver649

    blueriver649 MDL Novice

    Sep 6, 2012
    48
    3
    0
    I couldn't do it...Here is a screenshot, thanks.
     

    Attached Files:

  5. blueriver649

    blueriver649 MDL Novice

    Sep 6, 2012
    48
    3
    0
    How about zoom function ?
     
  6. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,762
    103,888
    450
    Why not just create a proper screen? the built-in snipping tool does a great job. I could also go get me some reading glasses :D

    But on topic:
    And include the folder showing the files you plan to delete? You can put a few in a folder and change the filenames if you want, as long as the .srt extension still is there.
     
  7. blueriver649

    blueriver649 MDL Novice

    Sep 6, 2012
    48
    3
    0
    Here is a bigger Screen shot and I would like to delete all those .srt , thanks E.
     

    Attached Files:

  8. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,762
    103,888
    450
    Your success folder is directly in the user folder? are the .srt files in the success folder too?

    Try to use:
    Code:
    del /f /q "*.srt"
     
  9. blueriver649

    blueriver649 MDL Novice

    Sep 6, 2012
    48
    3
    0
    Hi E,

    I am trying to delete all .srt in Hacking Videos folder, Screenshot Screenshot 2020-12-29 205315.png Screenshot 2020-12-29 205315.png
     
  10. ch4os

    ch4os MDL Junior Member

    Jan 9, 2010
    99
    110
    0
    It‘s still very unclear where your files are exactly. You tried different folders in your screenshots, yet no files were found.

    Are you sure those files are directly in the root of those folders you tried? Or are you trying to delete files in *all* subfolders?

    This will delete all matching files recursively from your current path:
    Code:
    del /s *.srt
    Please be careful with this command, it will delete matching files from all subfolders!

    Have a look at all available parameters with „del /?“ to understand what those parameters do exactly.
     
  11. blueriver649

    blueriver649 MDL Novice

    Sep 6, 2012
    48
    3
    0
    Thank you very much ch4os, I need /s parameter to make it work, it work perfectly. Thanks En and other Gents.
     
  12. open command prompt on windows & type any search query you want to search for suppose delete
    then your query to know about its commandline switches will be del /? or erase /?
    if you want to query for removing directories then it will be rmdir /? or rd /? (where rm stands for remove & dir stands for directory )
    if you want to make directory then you query will be mkdir /? or md /?
    just put single space using spacebar then /? after your search query & it will result in all the switches you can use plus there usage (description) on right side .