Shop Forum More Submit  Join Login
Compile the names of all files in a folder FAST. by AdvanceRun Compile the names of all files in a folder FAST. by AdvanceRun

I found a way to compile only names, of files in any given folder, into a text list ; automatically.  This might be useful to someone to save a little time .  


You'll get only the files names in a folder with this method; in a text list.

1. Open the folder you want to copy the names from

2. In that folder Create a .txt file ; and open it ,  then paste this text in it:      

dir /b >copylist.txt /b /o

3. Save it.  
Now ; change the extension of .txt to .bat

--if the text file wont change, then open a File viewer window ; full screen, at the top options look for View > Opt ions > Change Folder and Search options >  View
Un-check > * Hide Extensions for Unknown  file type. So now when you change the .txt to .bat, it will appear---  

4. Double-click on that .bat file; which will then  generate the .txt file with your list  in the folder  called ;  " copylist.txt"  .  

Enjoy placing that .bat file in any folder you need a list of names,  of files they contain .

It works well for images, im not sure how many files. It doesn't go into sub folders and files. To do that, you need a different code, I dont know what that would be.

EXAMPLE how this can be used  > > 

Why what's posted above helps, ( in windows ) for example > 
say you have paint tool Sai. And you have added a lot of new texture images to use with brushes . each of those images are named. They're inside the brushtex folder, or the blotmap folder, etc. 

But its not going to show in Paint tool Sai brush shape/texture options . 

Because you have to add the name of each image into the brushtex.config or brushform.config and save the names there. 

Example, inside the brushform.config will look like this 


So say i added a new image into the blotmap folder. I then have to rename>copy>paste that image "name" into the blotmap.config too before it registers in Sai. ( or just write the name into place ) 

1,blotmap\Video Grain.bmp

Now its in place, i save and close etc. 

The problem is. Say you added a ton of new images , or just want to erase some images, and need to update the config files to reflect the change , rename>copy> pasting if you have like example 100 images , is going to take a long time to copy the names down. 

Instead. The method i mention, auto generates the names of all the images into a text file. So the rename copy , typing one at a time part ; is taken out. 

In this case with the blotmap, all you'd then have to do is affix 
( Ctrl V ) the 1,blotmap\ to the beginning of each of the names from the auto generated text list ; then save that all in the config file. 

Its less work.

( a note about adding images into the old version of Sai - they have to be like 512x512 , you may be able to up it to 515x515 ; i think.
. And also have to be grayscale so the file remains small size; and saved in bit map. you can even compress the file in another format that dose that 


Add a Comment:
That-Tiny-Rii Featured By Owner Feb 5, 2016
You can also use it in command prompt~
AdvanceRun Featured By Owner Edited Feb 5, 2016  Hobbyist Digital Artist
 I heard some people say that. But I don't know how . They didn't take time to adequately explain . 
That-Tiny-Rii Featured By Owner Feb 6, 2016
You just select the folder using the CD command and then you paste in your command with right click
AdvanceRun Featured By Owner Edited Feb 6, 2016  Hobbyist Digital Artist
CD command ? Have a visual aid ? Video.
That-Tiny-Rii Featured By Owner Feb 6, 2016
Eh... CD means Change Directory.
And when the command was made, the compact discs didn't even exit. :)

Note: directory = folder

If you want to change directory, use
cd [name of the directory]

If you want to go up in the folder tree, use
cd ..

If you want to change the drives as well, use
cd /d [letter of the drive]:

Now when you set the folder you want to create a file list in, type or paste in
dir /b >copylist.txt /b /o

You can select, copy and paste using right click.

DIR is the command that displays a list of files and folders in a directory.
The /B flag tells the DIR command to not write file sizes or times and dates.
Copylist.txt is a filename. The list will be saved in this file, instead of being displayed.
The second /B flag is useless, since we already set it. We can remove it.
The /O flag makes the list ordered alphanumerically. First are folders, then files.

You can hit enter to send the command, or press up or down to browse last used commands.

After sending the command, the list gets saved into the file called copylist.txt, ordered like Folders[0-9-A-Z], Files[0-9-A-Z].
You can tell that something is a folder by not seeing a file extension like .txt, .png, .mp3 etc. It should also be on the top of the list.

I hope you understand it more now. ^^
AdvanceRun Featured By Owner Feb 7, 2016  Hobbyist Digital Artist
Yes helpful. I guess from my question you realized im not from around these parts. Kidding . I dont know much about computers. What i know amounts to copy and paste , really.  ill review closer what you shared later.
Add a Comment:


Submitted on
January 12, 2016
Image Size
852 KB


21 (who?)