I have a directory with for example 5 text files.
The batch file should perform a task on a text file and delete the file afterwards.
Is there a method to do this in a loop until there are no text files anymore?
By searching in world wide web I have found some code to count the number of files in a directory which may be a good starting point.
@echo off
set count=0
for %%x in (*.txt) do set /a count+=1
echo %count%
endlocal
Pause
Is there a method to incorporate this code into a batch file type of loop?