Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    May 2008
    Jacksonville, Florida, USA
    Thanked 0 Times in 0 Posts

    Create file of folder file names

    OS: Win7 HP x64 SP1

    I want to create a text file that contains a list of the file names contained in a folder.

    I would appreciate it if someone could provide me a script for doing this task.
    Dell Inspiron 15R, 8GB, Win7 Home Premium 64bit SP1
    All help truly appreciated!

  2. #2
    Administrator Rick Corbett's Avatar
    Join Date
    Dec 2009
    South Glos., UK
    Thanked 847 Times in 682 Posts
    You can use dir with a redirect. For example: dir C:\Windows > C:\Temp\list.txt.

    Open a command prompt and type dir /? to get a list of the possible operators.

    I must admit that I'm too lazy to try remembering all the operators so I still use Karen Kenworthy's Directory Printer. Its Save to disk option is incredibly easy to configure and use.

    Hope this helps...
    Last edited by Rick Corbett; 2016-11-25 at 09:35. Reason: Corrected typo

  3. The Following User Says Thank You to Rick Corbett For This Useful Post:

    flavet (2016-11-25)

  4. #3
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Oxfordshire, UK
    Thanked 195 Times in 187 Posts
    Open a CMD window (aka dos window).
    Navigate to the folder.
    enter (without quotes) "dir > list.txt
    This will create a file with the contents of the dir command in the current folder.

    Enter "dir /?" to get a list of parameters for listing subfolders and different info in the lists.

    Note > list.txt will delete that file should it already exist and that you can append more info by using >> list.txt

    Gah, beaten to the punch
    Eliminate spare time: get on the Internet!

  5. The Following User Says Thank You to access-mdb For This Useful Post:

    flavet (2016-11-25)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts