Monday, September 19, 2011

Get list of files or folder present in a folder

To get the list of files and subfolders present in a folder instantly use the following technique.

Step:1

Open the note pad and copy the following code and save the file as "getdirlist.bat"

****************************************************************
Code:

    @echo Files and Folder listing in a directory by Raj.
    @dir %1 /b > _dirListing.txt
    @echo Opening _dirListing.txt in Notepad (Closing notepad will delete the file so copy the content)
    @notepad _dirListing.txt
    @echo Deleting _dirListing.txt
    @del _dirListing.txt
    @pause

****************************************************************

Step:2

In the run command type "%userprofile%\SendTo" and press enter.
It will open the SendTo folder paste the saved  "getdirlist.bat" in the SendTo folder.

Step:3

Open the the directory which contains the folder which you want the list of files and folders.
Right click on the folder which you want the list and select Send To > getdirlist
It will open a notepad containing the files and folder names from which you can copy the list.

Note: Once you close the notepad the list will be deleted.


No comments:

Post a Comment