How to get a text list of files names in a folder in windows

07
2014-07
  • Yassinz

    I have a folder that has different file formats, is there a way to get all the files names and their extensions at once instead of copying and pasting

  • Answers
  • Wes Sayeed

    From a command prompt window, CD into the directory in question and then type

    dir /b > c:\<folder of your choice>\files.txt
    

    That will dump the directory listing to a file instead of showing it on the screen.

    The /b lists only the file names and none of the date/time stamps, sizes, and other junk you're not interested in.

  • askbill49

    In Windows Explorer you can set the View to Details. But to see the file extensions you need to make a a change to some settings. If your using Windows 8 > open File Explorer and click on View and then tick File extensions. If your using Windows 7 > open Windows Explorer > View > Folder Options > View and tic show file extensions.

    Then when in the Details view showing all the columns, tick in the Name heading and the files will be sorted according to name. If you want to print this, use the Dos command as stated in the previous answer.


  • Related Question

    windows 7 - How to change extensions?
  • studiohack

    In Windows 7, I want to change an .ai (Adobe Illustrator) file extension to a .pdf extension...How do I do this? I have tried renaming the file, but Win7 still thinks it is a .ai file...how do I change file extensions?

    I already know that I can turn on file extensions to the end of file names, but I'm looking for another option...Thanks!


  • Related Answers
  • AndrejaKo

    As Hello71 commented, to me it seems as if you are confusing things (if you aren't I apologize). File name extensions aren't meant to be changed like that. If you turn on the extensions at the end of file names, you can change its extension to .pdf, but it will not make it a PDF file. You will need to use some software to convert it to PDF. I think that Illustrator can do it natively, but I haven't used it in a long time. Another option would be to use one of those print as pdf drivers. If you have Acrobat installed, you should already have this. It will show up as printer. When you send something to be printed, it'll be converted into PDF. If you do not have Acrobat installed, just search for free print to PDF driver. There will be numerous results. I did use some of them a while ago, but I can't remember which one, so I cannot give you any recommendations.

    If what you wanted was just to rename file without converting it and without enabling extensions on the end of file names, you could try to use command prompt or powershell. Type CMD into start menu search and run the program. Then use cd command to go to the directory where the file which you want to rename is. The easiest way would be to go there inside explorer, cut the path and type cd into CMD and press space. Then using right-click paste the path. Here's and example of what you should get in CMD (assuming the files are in Peter directory on C: disk):

    C:\Users\AwesomeUserName\ cd C:\Peter
    C:\Peter\
    

    After that use the rename command to change file name, like this:

    rename michael.ai lazarus.pdf
    

    After that, michael.ai should be renamed into lazarus.pdf. As I said, that will not make the ai file into real .pdf file.

  • Mike Fitzpatrick

    A Illustrator file will still be an Illustrator file even if you change the extension to PDF.

    Extensions don't really get turned on/off in Windows - they are still there, just displayed or not displayed.

    If you have extensions turned off and you add a .pdf extension to an Illustrator (.ai) file, you are really renaming it to file.pdf.ai

    Windows only looks at the last extension to determine the file type. So nothing has effectively changed.