cmd find file command code example

Example 1: cmd find file dir

# EXAMPLE: show all files that start with abc in the current directory (option: only show filepaths)
dir /b "abc*" 

# SYNTAX
# dir <your-options-or-switches> "<what-you-are-looking-for>"

# OPTIONS
# /b    :    Show only filenames 
# /a-d  :    Show files only (no folders)
# /ad   :    Show folders only (no files)
# /s    :    Include the subfolders in the search

# https://www.dummies.com/computers/operating-systems/windows-xp-vista/how-to-search-for-files-from-the-dos-command-prompt/

Example 2: find name file in cmd

echo off
:start
cls

set /p input=masukan nama ? &
set result=| dir /a *.* /b | find "%input%"

echo %result%

pause
goto start

Example 3: cmder find file

Locate find.exe file:
where find.exe
Then rename it to a different name as fnd.exe and finally use this new commmand 
name to search files or directories in current and subdirs as follows:
fnd . -name "file_name"