I need to create three subfolders under any subfolder that contains the word "classified" in its name.
I have the following code that does the job but under a fixed name subfolder which is "test".
Code: Select all
@echo off
setlocal
set folder=C:\My Documents\test
for /F "tokens=*" %%G in ('dir "%folder%" /A:D /B') do (
if not exist "%folder%\%%G\subfolder1" md "%folder%\%%G\subfolder1"
if not exist "%folder%\%%G\subfolder2" md "%folder%\%%G\subfolder2"
if not exist "%folder%\%%G\subfolder3" md "%folder%\%%G\subfolder3"
)
Code: Select all
set folder=C:\My Documents\test
Code: Select all
set folder=C:\My Documents\*classified*
Can I get some precious assistance with this question, please?
Many thanks in advance ..
T.