SHARE
TWEET

Untitled

a guest Oct 12th, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. set test=%1
  2. for /f "delims=" %%A in ("!test!") do set "test=%%~A"
  3. echo test after process is "%test%"
  4. rem output: ""ARG=CUSTOM_SOURCE,SOURCE=C:FolderOtherFolderSourceFiles""
  5. :nextVar
  6.    for /F "tokens=1* delims=," %%a in ("%test%") do (
  7.       set %%a
  8.       set test=%%b
  9.    )
  10. if defined test goto nextVar
  11.  
  12. set test=%ARG%
  13.    
  14. set test=%test:"=%
  15.    
  16. set test=%1
  17.  
  18. :nextVar
  19.    for /F "tokens=1* delims=," %%a in ("%test:"=%") do (
  20.       set %%a
  21.       set test=%%b
  22.    )
  23. if defined test goto nextVar
  24.  
  25. set test=%ARG%
  26.    
  27. @set test="ARG=CUSTOM_SOURCE,SOURCE=C:FolderOtherFolderSourceFiles"
  28.  
  29. @set test=%test:~1,-1%
  30. @echo.%test%
RAW Paste Data
Top