Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I want to have a batch file that will delete all the folders and files in my cache folder for my wireless toolkit.

Currently I have the following:

cd "C:Usersbrolloj2mewtk2.5.2appdbRMS"
del *.db

This will delete all .db files in my RMS directory, however I want to delete every single thing from this directory. How can I do this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
680 views
Welcome To Ask or Share your Answers For Others

1 Answer

Use:

  • Create a batch file

  • Copy the below text into the batch file

    set folder="C:est"
    cd /d %folder%
    for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q)
    

It will delete all files and folders.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...