I have a string as:
"C:\Users\Desktop\Download 4.txt" "C:\Users\Desktop\Download 2.txt" "C:\Users\Desktop\Download 3.txt"
Output I need as follow:
"C:\Users\Desktop\Download 4.txt"
"C:\Users\Desktop\Download 2.txt"
"C:\Users\Desktop\Download 3.txt"
How should I get that using CMD?
Please help.
It's very easy as the FOR command splits a string using spaces and treats quoted strings as single tokens.
@echo off
set mystring="C:\Users\Desktop\Download 4.txt" "C:\Users\Desktop\Download 2.txt" "C:\Users\Desktop\Download 3.txt"
echo Original:
echo %mystring%
echo Split:
for %%i in (%mystring%) do echo %%i