위와 같은 폴더들이 있을 때 one 으로 시작하는 폴더들에 대해 어떤 작업을 처리하고 싶다면 FOR /D 를 사용한다.

for /D [/r] %%parameter IN (folder_set) DO command
>for /D %i in ("one*") do @echo %~nxi
oneapi-tbb-2021.5.0-win
oneTBB-2021.5.0

출처 : https://ss64.com/nt/for_d.html

 

for /d - Loop through directory - Windows CMD - SS64.com

Conditionally perform a command on several Directories/Folders. In all cases for /d will start searching from the current directory. Read the main FOR introduction page for a full description of assigning the replaceable %%parameter. FOR parameters are use

ss64.com

 

728x90

+ Recent posts