Thanks, but it says it can't find the command, probably
because the batch file is on the desktop because I've
been working with it. Where does it go? c:\windows?
Also, I think my batch file is wrong becasue when I
double-click on it, it prints to the printer and not to a
file. The one I have is:
@dir %1 /-p /o:gn > "%temp%\dir.txt"
@notepad /p "%temp%\dir.txt"
What's wrong with it?
Chuck
>-----Original Message-----
>You were close.
>Use: cmd /c dir >dir.txt
>
>Regards,
>Slobodan
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Have an opinion on the effectiveness of Microsoft
Embedded newsgroups? Tell
>Microsoft!
>https://www.windowsembeddedeval.com/...ity/newsgroups
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>"Chuck" <(E-Mail Removed)> wrote in
message
>news:1a2a201c41d96$734973b0$(E-Mail Removed)...
>> I have been trying to create a command that will allow
me
>> to print a directory's contents as a text file. I had
>> something similar in Windows98 but can't find the
>> instructions. In searching, I found and made one that
>> allows me to right-click on a file in Explorer and
print
>> its contents to the printer, but not to a text file. I
>> seem to recall that the one I used under 98 created a
>> file with a .prn extention in the directory in which I
>> right-clicked.
>>
>> Instructions I found for doing it that don't work are:
>>
>> C:\command.com /c dir > dir.txt
>>
>> I guess it doesn't work because apparently XP has no
>> command.com.
>>
>> A manual one that works at the dos prompt is:
>>
>> C:\>dir c:\folderpath > c:\folderlist.txt
>>
>> where folderpath is the name of the folder whose
contents
>> I want to print and folderlist.txt is the name of the
>> created text file with the folder's contents listed in
it.
>>
>> I would rather have it automated so that all I have to
do
>> is right click on the directory in explorer. Does
anyone
>> know how to do this in XP?
>>
>> Chuck
>
>
>.
>