DOS batch file that prints out contents of a folder in notepad?
I had a DOS batch file, that printed contents of a folder into a notepad text file, but I lost it and now I can’t find it anywhere, not even on google. Does anyone has it, know how to make it or know a site, where I can get it?
Observing members:
0
Composing members:
0
5 Answers
You can save the following as gen.bat:
@ECHO OFF
DIR /B %1 > %2”.TXT”
Then typing “gen <DNAME> <FNAME>” will create a file named FNAME.TXT in the current directory containing the contents of the directory DNAME.
For example:
gen “C:\Documents and Settings” PROGS
will create the file PROGS.TXT containing the contents of C:\Documents and Settings.
I don’t know how I missed that, it certainly wasn’t first on my searches. In the meantime, I found the original file and it seams it’s a little bit more elaborate:
@echo off
chcp 1250
dir /B %1>%TEMP%\content.txt
start /wait notepad %TEMP%\content.txt
del %TEMP%\content.txt
But thanks guys :-) May this help anyone looking for this in the future.
Try “ReNamer.exe”—Google it – Free, wors great!
Answer this question 
This question is in the General Section. Responses must be helpful and on-topic.