Thursday, July 10, 2014

How To Take Text From Folders (BAT solution)

You have several different folders with different names which are located at one spot on your PC. If you want to copy names to all of them into one single text file like a list it can be a problem since you do not know how to do that? Actually in this case there are many solutions but I will show you very simple one with using the standard Windows Notepad application. Just write simple code which is described in this tutorial, save the file and try how it works :). Whole process you can try with the next following steps:

Step 1 :  Go to Start Menu button then click under it on empty space for search engine where is written "Search programs or files..." and type Notepad. When search window find Notepad application click on it for open.

(click on photo to make it large)

Step 2 : When Notepad is open next step is to copy or type following code into it :

dir /a /b /-p /o:gen >foldernames.txt

(This code will take text informations from folder names and after that create a text file foldernames.txt where after saving you will be able to see all informations from all folders which are spot at the same direction as .bat file that we going to create at Step 3)

(click on photo to make it large)

Step 3 : After typing or copying code from last step, click on File > Save As... When new Save dialog window appear write whatever you want for File Name : but at the end of that name you most put .bat because without that you will just have a normal .txt extension file which we do not need right now (in this case I wrote FolderNames.bat like in photo example for this step). Save as type : switch from Text Documents (*.txt*) to All Files and then after chose direction where you want that file by click on Save.

(click on photo to make it large)

NOTE : Please remember that .bat  file which you save must be spot in direction from which you wont to take folder names lists.

Step 4 : Now is time to test saved .bat file. Find file that you just save from location where the folders are spot and then click twice on it. If everything is ok in the same direction just next to .bat file it should appear one more file foldernames.txt. Click twice on foldernames.txt and you will see the list of all folders from that direction which you chose. You can also use this file to take names of folder from any direction you wont. Very simple and fast way !

(click on photo to make it large)

Search This Blog :