Skip to content

Instantly share code, notes, and snippets.

@langheran
Created September 29, 2025 22:11
Show Gist options
  • Save langheran/5520f36aa22904989b56368cf2846978 to your computer and use it in GitHub Desktop.
Save langheran/5520f36aa22904989b56368cf2846978 to your computer and use it in GitHub Desktop.
C:\Users\NisimHurst\NDS\PiSA McKinsey\scripts\0. copy user or password.example.bat
@echo off
setlocal
:PROMPT
SET /P ACTION=User or Password (U/[P])? || SET "ACTION=P"
IF /I NOT "%ACTION%"=="U" IF /I NOT "%ACTION%"=="P" GOTO END
IF /I "%ACTION%" == "U" GOTO USER
IF /I "%ACTION%" == "P" GOTO PASS
:PASS
echo|set/p=<password>|clip
GOTO END
:USER
echo|set/p=<user>|clip
GOTO END
:END
endlocal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment