List folder files.


  1. Posts : 312
    Microsoft Win 10
       #1

    List folder files.


    How can I fall in love with all the files in a folder starting from 1 to the number of files that the folder contains.

    It could be some .bat or some advice thanks
      My Computer


  2. Posts : 2,487
    Windows 10 Home, 64-bit
       #2

    I'm guessing there's a typo in there somewhere.
      My Computer


  3. Posts : 14,108
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #3

    If the meaning is to get a list, one could open a Command Prompt window, change to the folder desired and type dir /o/s which will list all the files and folders plus subfolders. The switch /o organizes alphabetically and the /s includes subfolders. Could also add >list.txt to get something to print, open in Notepad, WordPad or your word processor.
      My Computers


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

    Copy text in red and create GenFileList.bat and place it in c:\users\yourname.

    dir /a /-p /o:gen >%temp%\GenFileList.txt & notepad %temp%\GenFileList.txt & del %temp%\GenFileList.txt


    Copy text in red and create AddGenFilelist.reg. and place it in c:\userss\yourname. Change yourname to your account name here and in the reg file.

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\*\shell\isLink]
    @="Create File List"
    "Extended"=""

    [HKEY_CLASSES_ROOT\*\shell\isLink\command]
    @=""c:\\users\\yourname\\GenFileList.bat" "%1""

    [HKEY_CLASSES_ROOT\Directory\shell\isLink]
    @="Create File List"
    "Extended"=""

    [HKEY_CLASSES_ROOT\Directory\shell\isLink\command]
    @=""c:\\users\\yourname\\GenFileList.bat" "%1""



    Now double click on AddGenFilelist.reg to add it to the registry. Click Yes or OK as needed.

    Now when you are in File Explorer and you want to get a list of files and folders in a directory (Folder). Press the Shift key then select Create File List.

    List folder files.-cfl-1.jpg


    A small Command Prompt window will open and stay open until you close the notepad window which will open behind other windows.
    List folder files.-cfl-2.jpg

    When you close this the Command Prompt window will also close.
    List folder files.-cfl-3.jpg

    Hope that makes sense. Sounds like a lot, really isn't.
      My Computers


  5. Posts : 318
    Windows 10 Home Single Language 21H1
       #5

    i have 4 bat files for this

    list-dir-foldernfile.bat
    dir /b /o:n>foldernfile.txt
    list-dir-onlyfolder.bat
    dir /a:d /b /o:n>onlyfolder.txt
    list-dir-subfoldernfile.bat
    dir /s /b /o:n>dirlist-subfoldernfile.txt
    list-dir-subonlyfolder.bat
    dir /a:d /b /o:n /s>dirlist-subonlyfolder.txt
    i put them to folder which i want to have a dir list
      My Computer


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

    Output goes to the folder the bat file is in?

    I find context menu selection is easier. Could be changed to support multiple choices, like you have.
      My Computers


  7. Posts : 318
    Windows 10 Home Single Language 21H1
       #7

    Ztruker said:
    Output goes to the folder the bat file is in?
    yes, but you can change it to your desktop (or somewhere else) if you want

    like this

    DIR /B /O:N>"%userprofile%\desktop\foldernfile.txt "
    Ztruker said:
    I find context menu selection is easier. Could be changed to support multiple choices, like you have.
    you can work on
    maybe the code goes into registry not a bat file

    i make a folder "C:\CAT" it is my path directory, i put this 2 bat files in it, (and other .bat stuff)
    when i want a list from these 2 directories
    i open (win+r) run and write "index-apps" or "index-portable"
    they gave me list to my desktop

    index-apps.bat

    @echo off
    dir c:\portable /a:d /b /o:n > "%userprofile%\desktop\[Alfa400C-YRL] root-portable.txt
    index-portable.bat

    @echo off
    for %%a in ("%userprofile%\desktop\apps\*") do @echo %%~na >> "%userprofile%\desktop\[Alfa400C-YRL] desktop-apps.txt"
    i found the second code from somewhere on internet, code only give me only file names (not extensions)

    it is a good idea making context menu with that
      My Computer


 

  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 22:21.
Find Us




Windows 10 Forums