I'm fairly new to batch scripting, and I need to write a pretty simple .bat file that will loop through a directory. I know how to do it pretty easily using the goto command:
@echo off
:BEGIN
::set variable to data in first file
::do operations on file...
IF ::another file exists in the directory
::increment to next file
GOTO BEGIN
ELSE
GOTO END
:END
cls
The problem is that's the only way I can think of to do it. I know goto's are generally very frowned upon to use, so I was wondering if anyone knows another way to do this? Thanks!