Hello There, Guest! Register Register
ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5


Get Filename Only in Directory

YASAKA
This post was last modified: 05-13-2019, 03:33 PM by YASAKA.
#1
Get Filename Only in Directory
This post was last modified: 05-13-2019, 03:33 PM by YASAKA.
Using CMD
  1. Open a command prompt (Start -> Run -> cmd Enter)
  2. Navigate (cd) to the directory whose files you want to list.
    cd /d <directory>
  3. Enter dir /b > output_file_name (e.g., dir /b > C:\dir.txt) and press Enter.
  4. Open the newly created text file (C:\dir.txt) and you'll have the complete output of the dir command in that directory.

Using Batch File
  1. Open notepad
  2. Create new file
  3. type bellow line
    dir /b > fileslist.txt
  4. Save list.bat
  5. Thats it. now you can copy & paste this "list.bat" file any of your folder location and double click it, it will create a "fileslist.txt" along with that directory folder and file name list.

Sample Output
[Image: 20190513153345b668b69c400b45b26a89e7353cad8a57.jpg]

Note: If you want to create a filename list along with subfolder, then you can create a batch file with below code.
Code:
dir /b /s > fileslist.txt
[Image: DemonInside.png]