Reputation: 13
So I'm trying to loop through folders and files in order to command on all of them.
for /d %%i in (*) do echo %%i
However the folder appears to be listed twice:
echo test
test
How do I fix it?
Upvotes: 1
Views: 264
Reputation: 73616
Disable displaying of the commands before execution:
@echo off
as the first line of the batch file@
, for example: @echo %%i
Upvotes: 3