List files from certain folder using batch

Experimenter

I want to find the .seq files from src folder and its sub-directories. I'm trying with below approach but it doesn't create a devtest.txt file. Any help please.

For /R %%A In (src\*.seq)Do @Echo drafting.rep:%%~nxA >> devtest.txt
lit

A FOR loop will find all of the files and run the ECHO command on them.

@SET "SEARCHDIR=C:\src"
@SET "LOGFILE=%USERPROFILE%\devtest.txt"

@IF EXIST "%LOGFILE%" (@DEL "%LOGFILE%")

@FOR /F "delims=" %%A IN ('DIR /S /B "%SEARCHDIR%\*.seq"') DO (
    @Echo drafting.rep:%%~nxA >>"%LOGFILE%"
)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Batch: Exclude certain files from select list

Delete all files in folder except file in list using batch

Delete zero sized files from a specified folder using batch file

Move multiple files from subfolders to one folder using CMD or Batch

Copy certain files from one folder to another using python

Batch Files: List file names and folder names

Downloading a list of files from ftp to local folder using c#?

How to get list files from a github repository folder using R

How to delete files from a folder using a list of file names in windows?

Batch rename files in linux using folder name

Adding files to a zip folder using batch

rename batch files in folder using a textfile

Batch file to delete files from wildcard folder

Importing several txt files from certain folder

How to read certain files from raw folder?

How to list all files of specific extensions inside a folder with numbering order using batch file

Using a list of all file names, output missing files names if not contained in folder (batch script)

How to list the names of all the files and directories in a folder using for loop in a batch file

xml files from folder into list

Batch file to list txt and mp3 files - using the list extract the same lines from the text files

copy a certain value from multiple identical .txt files using batch script

Batch program to copy files from one folder to another folder

Spring Batch how to read all json files from a folder and all its sub-folders using PathMatchingResourcePatternResolver

Move Multiple Files from Subfolders to Single Folder using Windows batch script

Open only non-zero text files from a folder using batch script

Move All Files from all Subfolders to Parent Folder using batch script

Delete all files from a folder using a bat that match a certain pattern in Windows 10

how to Ignore certain files from main folder when reading .txt file using arraylist

check if file with certain file extension present in folder using batch script