I'd like to generate multiple output texfiles in batch, based on directories+subdirectories (one level below) with timestamp in it.
Okay, I realize it's not so easy to understand, so here's a concrete example of a folder/subfolder setting and the output that I'd like:
I:\Directory A\Subdirectory 1\...
I:\Directory A\Subdirectory 2\...
I:\Directory B\Subdirectory 1\...
I:\Directory B\Subdirectory 2\...
For this previous directory setting, I'd like to craft a batchfile that will generate a text file for each subdirectory, named in that fashion:
[Directory A] Subdirectory 1.txt
[Directory A] Subdirectory 2.txt
[Directory B] Subdirectory 1.txt
[Directory B] Subdirectory 2.txt
I manage to craft this following batchfile that works perfectly, but it will only list the main directories, not the first subdirectories:
Code: Select all
for /d %%i in (*) do echo %date% > I:\listing\%%i.txt
Someone could help please?