Skip to content

Instantly share code, notes, and snippets.

@wiennat
Created November 1, 2011 02:53
Show Gist options
  • Select an option

  • Save wiennat/1329700 to your computer and use it in GitHub Desktop.

Select an option

Save wiennat/1329700 to your computer and use it in GitHub Desktop.
For loop in bat file
for %%i in (*.txt) do echo %%i
Sometimes we want only filename. Use %~n1 instead
Ex.
for %%~ni in (*.txt) do echo %%~ni
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment