Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

windows command line delete a file in all subdirectories

:: to delete the file named 'foo.txt' from all subdirectories of the current 
:: working directory
:: run this command in the windows cmd.exe shell:
for /f %f in ('dir /d /b') do del /s /q %ffoo.txt

:: if 'foo' is a directory, the previous command merely empties the directory
:: to clean up and remove the empty foo directories afterwards run this command
for /f %f in ('dir /d /b') do rd /s /q %ffoo
Comment

How to delete dir, subdirectory, fils all in cmd

[destination]rd [deleteable dir] /s

Like:

c:myFolder
d dirName /s
Comment

PREVIOUS NEXT
Code Example
Shell :: command to kill or terminate a process 
Shell :: moodle update cli 
Shell :: git liste branches 
Shell :: git update from another branch 
Shell :: install magento 2 docker 
Shell :: pull branch from github 
Shell :: easy disk cleaner 
Shell :: install peer dependencies in npm 
Shell :: renommer la branche main de git 
Shell :: centos 8 gui 
Shell :: yum stands for in linux 
Shell :: how to scroll up in linux terminal 
Shell :: awk use string as field separator 
Shell :: create fish alias 
Shell :: dracula theme gnome terminal 
Shell :: flask make host public 
Shell :: force push to remote branch 
Shell :: how to install fluter 
Shell :: bash delete a command line 
Shell :: cat in bash shell 
Shell :: how to get list folder in cmd to value 
Shell :: find in terminal 
Shell :: Examples of add-apt-repository and updating the APT cache 
Shell :: Create Remote for Contributing to a GitHub project 
Shell :: git cache ssh password 
Shell :: ve-restore-user database only 
Shell :: installing Shoes 
Shell :: nautilus open random file 
Shell :: thinderbird download linux mint 
Shell :: Install Geforce Now on Ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =