Monday, April 8, 2013

Generate File List - Windows

I am not sure whether any tools available for the below requirement.But it will help u sure!


Requirement:

Just tell me how you copy the file name?

I hope most of use doing "F2" and copy Or "right click" then rename->copy.

If the number of folder or file is in single digit, then Its fine. If we have some 100's of folders and files means?

So,Sometimes we thought that we should get the list of these files and folder names in a excel or text file by simple one click.

Yes.It's a possible.Just follow the steps as given!

Code: (save this as "test.bat")

@echo off

dir /on /b >list1.xls            /*This code helps you to get name list of folders and files*/

dir /on /b /s >list2.xls    /*This code helps you to get the whole files and folder list with details*/

dir /ad >list3.txt        /*This code helps you to get only the folder list*/

END


Execution:
  • Just place this "test.bat" file to the root folder where we needs to prepare list.
  • You can run this by double click.
  • The results will be stored in same root path. Here the result files are "list1.xls,list2.xls,list3.txt".
Try yourself and put your suggestions or questions in the comments!

- Er.Rajkumar PP