View Single Post
  #5  
Old November 5th 17, 07:38 AM posted to microsoft.public.win98.gen_discussion
Lee
External Usenet User
 
Posts: 196
Default Is there a way to turn a folder's filenames into a text file?

On Saturday, November 4, 2017 at 7:47:03 PM UTC-6, J. P. Gilliver (John) wrote:
In message , Lee
writes:
[]
A quite simple registry addition will make a text file from any
folder's content quite easily. Copy and paste the text below into a
blank notepad document with two blank lines following the outlined text
below (do not include the lines) and save it as dir.reg. Then double
click it and answer yes to merge with registry. Reboot, from now on
your right click menu will include a DirPrint option and when you
select it, the folder's directory listing will be written to
C:\ADIR.TXT where you can open it and print it if so desired. That file
will be overwritten without notice when the option is selected again so
if it's content is valuable then you should move it somewhere safe PDQ.


Thanks for this.

----------------------

REGEDIT4

[HKEY_CLASSES_ROOT\Folder\shell\DirPrint]
@="&DirPrint"

[HKEY_CLASSES_ROOT\Folder\shell\DirPrint\command]
/C DIR %1 /a /o:gneC:\\ADIR.TXT"


----------------------
Since this approach uses 9x's DOS emulator as in a DOSbox situation,
you will have BOTH the short 8.3 name and the long filename if it even
exists.


If you leave out the "C:\\", will it create ADIR.TXT in the directory
whose files it lists?
[]
--
J. P. Gilliver. UMRA: 1960/1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

Religion is a name for opinion that cannot be argued about. [Heard on Radio 4,
2010-10-18, 9:xx.]


You are certainly welcome and glad to actually help. It's probably going to drop the file in the Windows folder instead since that's where command.com lives. One could have it the way you ask about by using the %1 passed parameter which represents/expands to the complete folder pathname in question. So %1\\ADIR.TXT may be just the ticket for that behavior asked about. It will overwrite any file of that particular name in that folder, but what are the odds?