List down file names in a folder

Differential
@differential-0aMwAJ โ€ข Oct 27, 2024

On my computer, I have a folder which contains many files. I want all these file names to be listed in an spreadsheet. How do I do that? DOes windows provide any facility for that?

๐Ÿ˜›

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • ms_cs

    @ms-cs-Ab8svl • Mar 26, 2009

    DifferentialOn my computer, I have a folder which contains many files. I want all these file names to be listed in an spreadsheet. How do I do that? DOes windows provide any facility for that?

    ๐Ÿ˜›

    You can use the following java code part to get the names of files in particular directory and use FileWriter class to write the file names in a excel file
    File folder = new File("c:/");
    File[] listOfFiles = folder.listFiles();
    System.out.println("File " + listOfFiles.getName());

  • Differential

    @differential-0aMwAJ • Mar 26, 2009

    ms_csYou can use the following java code part to get the names of files in particular directory and use FileWriter class to write the file names in a excel file
    File folder = new File("c:/");
    File[] listOfFiles = folder.listFiles();
    System.out.println("File " + listOfFiles.getName());



    Finally some hope for me................

    Thanks for your reply. ๐Ÿ˜€

    BUT, I am totally unknown to Java and Filewriter and whatever they are.
    You might have to tell me in detail and in step by step to get these file names to excel (spreadsheet). And Yeah, I am little familiar with excel macros. Would that help in this task?

  • ms_cs

    @ms-cs-Ab8svl • May 9, 2009

    you can store it in excel sheet by,

    1.open the command prompt
    2.just type,

    dir > filename.xls

    Hope this may help you ๐Ÿ˜€

  • Differential

    @differential-0aMwAJ • May 9, 2009

    ms_csyou can store it in excel sheet by,

    1.open the command prompt
    2.just type,

    dir > filename.xls

    Hope this may help you ๐Ÿ˜€

    I can store what in excel sheet? Pls explain what you want to say in detail.

  • ms_cs

    @ms-cs-Ab8svl • May 9, 2009

    You can store the names of the files with the size,

    try this,

  • shalini_goel14

    @shalini-goel14-ASmC2J • May 13, 2009

    ConanThis tool is very helpful to list down when we have more number of files, say in 100's in a folder. It is best when linking of it also enabled.

    Hi Conan,
    About which tool you are talking about? Please name it, I couldn't get it. ๐Ÿ˜•

    Thanks !