DOS Create .txt List of Folders
REM ## simply creates a .txt list of all of the folders in the directory where the .bat file is executed. By Stacey Tipton Reiman, www.akwebgenius.com/blog ##
@echo off
setlocal ENABLEDELAYEDEXPANSION&pushd %~dp0
if exist directory_list.txt del directory_list.txt
set fileout=directory_list.txt
for /f %%R in ('dir /a /b /ad ') do call :1 %%R
goto :eof
:1
%1
echo %1>>!fileout!
cls
endlocal
