I have created a batch file to output a folder content into a list of names.
@echo off
cd /d %1
Title %~f1
dir %1 /b /l > %1\..\file_list.txt
How can I make the file_list.txt to be "dir name".txt?
For example I am at folder ABC and I want to output the dir list so that the final text file will be named ABC.txt instead of file_list.txt
Edit: Thanks Alconja, it works PerfectlY. Since this is an information and learning site, would you mind expanding your answer to explain the parameters you add?