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

  1.    03 May 2018 #1

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


    Hi.
    Below link shows a method to do that, but its probably for older versions of windows.
    How to Copy a List of Files in a Windows Folder Into an Excel List | Chron.com

    In windows 10, when I Shift+right click on a folder to open the Powershell window and type dir /b > dirlist.txt to generate a text file of filenames in the folder, this command is returned as invalid.

    Would be grateful for any help.
    Regards.
      My ComputerSystem Spec

  2.    03 May 2018 #2

    Use cmd prompt dir *.* > Duelist.txt
      My ComputerSystem Spec

  3. Bree's Avatar
    Posts : 8,793
    10 Home x64 (1809) (10 Pro on 2nd pc)
       03 May 2018 #3

    seymoria said: View Post
    In windows 10, when I Shift+right click on a folder to open the Powershell window and type dir /b > dirlist.txt to generate a text file of filenames in the folder, this command is returned as invalid.
    It's because you used /b which is a valid option in a command prompt, but not in Powershell. Redirecting to a text file works in Powershell if you just type dir > dirlist.txt

    You can switch to using a command prompt in Powershell by typing cmd, then you'd be able to use dir /b. Type exit to return to Powershell.
      My ComputersSystem Spec

  4.    04 May 2018 #4

    Hello guys.

    Thanks so much, problem got solved very simply.
    Indebted for your kind advice.

    Best regards
      My ComputerSystem Spec


 

Related Threads
I have a folder with someh hundred subfolders. Is it possible to have these folder names in a text file?
So look at this photo: 157764 How can I make Windows 10 display those folder names longer by default? Thanks
I had Windows 10 briefly about a year ago, and I downgraded to Win 8.1 soon after. Frankly, other than the annoying million hour updates, I hated hated hated how folder and file names suddenly after one of the major updates were all stuck to the...
- Winkey, “cmd” - “cd e:\media\trainingvids” - “dir *.* /s /b /a -d > c:\temp\dork.txt” So, with that I'm opening a command prompt, changing to the correct directory, doing a directory listing of all files (including sub-directories (/s), no...
Unable to copy file from Excel jump list in Microsoft Office and 365
Hi, With Win7 I used to be able to copy a recent or pinned file from any MS Office jump list by right clicking and selecting Copy from the context menu For Win 10 the menu is still there but when you r/c the file it doesn't appear to be in focus...
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 20:58.
Find Us