The following function is to output all the folder names under the current folder and connect them with commas.
You need to put the bat file in the specified folder for execution.
@echo off
for /D %%i in (*) do set /p=%%i,<nul
pause
Running effect picture:
Like the one you like ❤!