Skip to content

Instantly share code, notes, and snippets.

@davidruhmann
Last active May 8, 2022 18:47
Show Gist options
  • Save davidruhmann/4694494 to your computer and use it in GitHub Desktop.
Save davidruhmann/4694494 to your computer and use it in GitHub Desktop.
[Batch] Path Environment Variable
:: Loop through the paths listed in the PATH evnironment variable
for %%A in ("%Path:;=" "%") do @echo %%A
:: Do not use setx to set the Path variable, because it will
:: truncate the Path string to a maximum of 1024-5 characters.
:: This is due to the cmd.exe command line length limitations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment