How to copy a list of file names in a folder to text file?

Page 2 of 2 FirstFirst 12

  1. Posts : 17,001
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #11

    Rich,

    You've accidentally used your own username intead of %username% on line 17.

    Is line 21 really as you intended it?

    Denis
    Last edited by Try3; 01 Oct 2020 at 03:15.
      My Computer


  2. Posts : 2,167
    Windows 11 Pro (latest update ... forever anal)
       #12

    Karen's Directory Printer
    Karen's Directory Printer the File Cataloging Utility for Windows v5.4.4 Released May 25, 2020 | Karen's Power Tools

    No coding, just settings. Files and/or folders. Print straight to paper, or save as a text file.
      My Computers


  3. Posts : 14,050
    Windows 11 Pro X64 22H2 22621.1848
       #13

    Karen Kenworthy wrote some great tools, this is one of them but it's a bit more involved and can be confusing to new users.
    I have it installed and use it at times but the simple method I posted works great for getting an immediate list of files and folders in a directory.
      My Computers


  4. Posts : 14,050
    Windows 11 Pro X64 22H2 22621.1848
       #14

    Try3 said:
    Rich,

    You've accidentally used your own username intead of %username% on line 17.

    Rats, exported the registry data and forgot to change it to %username%

    Is line 21 really as you intended it?

    Should be Echo @echo off ^& set filelist=%filelist% > %batchfile%

    Denis

    Converting to use REG instead of REGEDIT. Should be done in a little while.

    Edit: Dumped the zip and pointed to the BSOD repository now that it's correct.

    Thanks Denis.

    Edit2: Having problems converting to use of REG. Asked for help in a different thread. Why does this not work
    Last edited by Ztruker; 01 Oct 2020 at 12:54.
      My Computers


  5. Posts : 1
    Windows 10
       #15

    To answer the original posters question, instead of using /b, you can use the following command in PowerShell without switching to CMD

    dir -Name >dirlist.txt

    If you want to know what the other parameters available are, you can use this:

    (Get-Command dir).Parameters
      My Computer


  6. Posts : 14,050
    Windows 11 Pro X64 22H2 22621.1848
       #16

    Or Powershell dir -Name >dirlist.txt from Command Prompt
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:09.
Find Us




Windows 10 Forums