sql - Batch file "For /f" loops each folder twice and listing files twice -
this loop loops through files twice. why so? how can modify each .sql file listed once.
for /f %%g in ('dir /s /b "%scriptspath%" *.sql') ( echo "%%g" )
the dir command getting confused "*.sql" separate argument. try instead. code assumes scriptspath variable end in backslash.
for /f %%g in ('dir /s /b "%scriptspath%*.sql"') ( echo "%%g" )
Comments
Post a Comment