Last active
November 10, 2019 12:30
-
-
Save KenDB3/2bd29f5108e189fae9abd303ce1d9960 to your computer and use it in GitHub Desktop.
Windows Batch File that takes a quoted text command line argument, removes the quotes, and replaces spaces with underscores
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
REM Windows Batch File that takes a quoted text command line argument, | |
REM removes the quotes, and replaces spaces with underscores. | |
REM This is useful for passing an argument to another program. | |
REM Change Directory to where the Batch file is saved | |
CD /d "%~dp0" | |
set originalquotedtextwithspaces=%1 | |
set noquotes=%originalquotedtextwithspaces:"=% | |
set withunderscores=%noquotes: =_% | |
SomeProgram.exe %withunderscores% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment