Skip to content

Instantly share code, notes, and snippets.

@jcefoli
Last active Aug 29, 2015
Embed
What would you like to do?
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