Skip to content

Instantly share code, notes, and snippets.

@jcefoli
Last active June 23, 2023 00:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcefoli/0f28e6a8dcaac4d8bbd7 to your computer and use it in GitHub Desktop.
Save jcefoli/0f28e6a8dcaac4d8bbd7 to your computer and use it in GitHub Desktop.
Batch File User Input: Convert Spaces to %20
@ECHO OFF
REM This snippet will take an input string with spaces and replace them with %20
SET /p input=Input string:
SETLOCAL ENABLEDELAYEDEXPANSION
SET input=!input: =%%20!
ECHO.
ECHO %input%
PAUSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment