Is there any easy way to create a text file in only readme
sub-folder I want to create a read-me.txt
file with content example@gmail.com
I don't want to open folder one by one there are thousands of folders in partition C:\management
│
├───employees
│ ├───1559ad36254x
│ │ ├───work
│ │ ├───logs
│ │ └───readme
│ └───ayu6734287as
│ ├───work
│ ├───logs
│ └───readme
├───acy7wr7grill
├───acsaagsdy345rchs
├───adarsyuewoli
├───adgw843brhe
├───ahbe67ts
├───…
└───…
Is there any command that can create a file in every readme
sub directory I am trying with this command to find readme
directory and then create a new file using echo
command
cd C:\management & for /f %x in ('dir readme /a:d /s /b') do echo example@gmail.com>%x\read-me.txt
This command is working but taking too much time because first it will find all paths containing readme
folder:
C:\management\employees\1559ad36254x\readme
C:\management\employees\ayu6734287as\readme
C:\management\acsaagsdy345rchs\random87as\readme
C:\management\zsaagsdy345rchs\fir87as\readme
After that it will create a new file in readme
directory. Is there any Powershell or Cmd command that can find path then create file then find next path and create file?