Link to home
Start Free TrialLog in
Avatar of lhutton
lhutton

asked on

Print Directory Contents

I want to be able to print the contents of a directory (and its subdirectories) to Notepad (where it can be edited before printing) and ignore MS-DOS format names and extensions, showing full directory and file names first. Is this possible?
Avatar of a.marsh
a.marsh

This is almost what you want (I'm not really a DOS expert, so I'm not sure if I can get get it do anymore):

1 - go to a command prompt
2 - change in to the directory that you want to list
3 - then run this command

dir /s /b *.* > filelist.txt

Now you can open filelist.txt in Notepad - in fact you can do that directly from the command prompt aswell:

notepad filelist.txt

You can of course use any filename you like instead of filelist.txt

:o)

Ant
Avatar of lhutton

ASKER

Many thanks for the suggestions, but I'm hoping for a DOS solution like:

@echo off
dir %1 /-p /o:gn > "%temp%\Listing"
start /w notepad /p "%temp%\Listing"
del "%temp%\Listing"
exit

- although this prints automatically and doesn't ignore MS-DOS format names and extensions, showing full directory and file names first.
I use a program called DragandFile gold which is similar to but a lot more powerful than Windows Explorer to do exactly this amongst other things. It can print directory lists or save them to an ascii file for loading to Excel etc. It also can "see" files inside a zip file and allow you to extract them direct without opening the complete zip file - it can also create zip files etc etc.
Download it from www.canyonsw.com and it will work for 60 days before asking for payment. A work around this is to change your computer date prior to loading it and once loaded change the date back to the correct date.
cheers, Pete
Avatar of lhutton

ASKER

Thanks, Pete. But it doesn't seem to be able to print the contents of a directory and its subdirectories, along with dates and everything.
ASKER CERTIFIED SOLUTION
Avatar of LeeTutor
LeeTutor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lhutton

ASKER

Thank you all for your suggestions. Both PrintFolder Pro and STG FolderPrint were able to produce *exactly* what I wanted. I'll ask CS to split points evenly between hendrik999 and LeeTutor.
lhutton has requested an adjustment to this question, to have both experts share equally.  Adjustment in process.  I will post a link for the other half for hendrik999 shortly.

Moondancer
Community Support Moderator @ Experts Exchange
hendrik999, please comment at this link to get your half share of this award.

https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=win98&qid=20138067

Moondancer
Community Support Moderator @ Experts Exchange