Hi,
Im trying to make a batch script which can go through a directory and pick all the .txt files and copy the name in a file. Ive been able to make a script which can do this in a particular folder but if there is a folder in the folder it doesnt check in that, this is what I have so far,
@echo off
rem get files into text file
set PD=%CD%
set WW=%1
set WD=%WW%
CD %WD%
dir /b | gawk "{print $1}" | grep \.c | sed "s/\.txt//g" > %PWD%\testing2.txt
I was thinking of using recursion to to go deeper into the folders but im not sure how to identify a folder, If I can I can use it as a kind of a stop case.
Thanks,
Rahul