Tuesday, November 4, 2014

How do we find list of directories in a folder in batch file?

@echo off
set basedir=C:\work\perl

set PWD=%cd%
set today=%date:~-4%-%date:~4,2%-%date:~7,2%
if not exist %PWD%\%today% ( mkdir %PWD%\%today% )
dir /s /b /a:d %basedir% > %PWD%\%today%\%today%.ini

No comments :