Skip to content

Instantly share code, notes, and snippets.

@bjesuiter
Last active August 22, 2023 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjesuiter/5c7b882fa71f0b15186aa5714cd0f419 to your computer and use it in GitHub Desktop.
Save bjesuiter/5c7b882fa71f0b15186aa5714cd0f419 to your computer and use it in GitHub Desktop.
Windows CMD Tricks
# 'Res-Params' - Get a list of all params after a finite amout of params
# For Example: Collect all params after %1 to pass them to another cli.
set param_1=%1
for /f "tokens=1,* delims= " %%a in ("%*") do set ALL_BUT_FIRST_PARAM=%%b
echo "Call Some other cli with the rest of the params: %ALL_BUT_FIRST_PARAM%"
# For Example: call %CMDER_ROOT%\opt\.wapm\wapm_packages\.bin\%command% %ALL_BUT_FIRST%
# reload windows environment variables (win env) without reboot
# https://search4fan.github.io/post/win10_new_system_variable_without_restart.html
set PATH=C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment