W
W
WQP2017-10-01 13:44:13
cmd/bat
WQP, 2017-10-01 13:44:13

How to delete folders recursively?

There is a folder, it includes many more folders. Of all of them, you need to delete 2 folders: node_modules and vendor. How to write a cmd file?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kisaa, 2017-10-02
@kisaa

in PowerShell:
cd foldername
Get-ChildItem \*\node_modules,\*\vendor | Remove-Item -Recurse

O
Olgeir, 2017-10-02
@Olgeir

for /f %a in ('dir /b /s "node_modules" "vendor"') do del /q %a&rd /q %a

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question