# A means to get txt file of all files within directory

**URL:** https://forum.kirupa.com/t/a-means-to-get-txt-file-of-all-files-within-directory/195092
**Category:** open source
**Created:** [July 28, 2006, 10:59am UTC](https://forum.kirupa.com/t/a-means-to-get-txt-file-of-all-files-within-directory/195092 "2006-07-28T10:59:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![MichelleX](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@MichelleX](https://forum.kirupa.com/u/MichelleX)
#### Post date: [July 28, 2006, 10:59am UTC](https://forum.kirupa.com/t/a-means-to-get-txt-file-of-all-files-within-directory/195092/1 "2006-07-28T10:59:46Z")

</div>

Some of you guys may already know about this, but I just found this out last night and thought it would be useful to share (especially in the dynamic image loading projects):

How to create a text file list of the contents of a folder: (Win)

Go to your DOS prompt and type:

- Type c: (or whatever the drive letter is that you’re trying to get to) and hit Enter.
- Type in the “cd” command with the full path to your folder you want the text file created from.  
example:\* cd\Documents and Settings\MichelleX\Desktop\project\images
- \*Then type the “dir \>” command, along with the name of the text file you want and hit Enter.  
example: dir \>myimages.txt

So now, if you go to your folder, you’ll have a text file in there with a list of all things in that directory. With a little bit of cleaning up, you could just copy/paste those file names in your xml sheet or whatever you’re using.

cheers,  
~Michelle
