Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make a text file with paths to all my files of a given extension?

I'm trying to use the freeware Multiple Find And Replace 1.00 suggested in this question.

Multiple Find And Replace 1.00 http://www.nontube.com/images/screenshot-mfar.png

Unfortunately it requires that I explicitly select each file I'd like it to search.

But, it does allow me to load in a text file of the file paths.

C:\one.txt  
C:\two.txt  
C:\somedirectory\three.txt

I'd like a text file of paths to all files with extension .php within a certain directory and all its subdirectories (recursive).

Does anyone know of a ready-made tool I can use to quickly generate such a list of files?

like image 464
Zack Peterson Avatar asked Jan 24 '23 23:01

Zack Peterson


1 Answers

You can use built-in DOS commands like so:

cd /d "[base-directory]" && dir /s /b *.php > [list file]

e.g.

cd /d "c:\my files" && dir /s /b *.php > c:\list.txt
like image 137
Brett Avatar answered Jan 29 '23 06:01

Brett