Suppose I have the command:
:start
if /i "%%~fs"=="%drive%" cd %%~fs&md Favorites 2>nul
if /i "%%~fs"=="%drive%" cd %%~fs&md "Discography Info" 2>nul
...
goto start
How would I loop the command and each time put in a different name?
Suppose I have the command:
:start
if /i "%%~fs"=="%drive%" cd %%~fs&md Favorites 2>nul
if /i "%%~fs"=="%drive%" cd %%~fs&md "Discography Info" 2>nul
...
goto start
How would I loop the command and each time put in a different name?
You can do it similar to this:
@echo off
for %%f in (*) do call :printit "%%f"
goto :end
:printit arg1
echo %~1 ---- %1
exit /b 0
:end
echo Done.
pause