You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Finding literal carets is interpreted by Notepad4 as escaping the latter quote, leading to this highlighting mistake with open quotes (the latter image is the correct highlighting)
The text was updated successfully, but these errors were encountered:
Escape any Special Characters in command_to_process.
If any of the strings contain characters which need to be escaped such as an Ampersand, Caret or a Pipe, (e.g. a folder path such as
"C:\Demo & Folder") then you have a couple of options:
Escape each special character with ^
FOR /f /"tokens=* delims=" %%G in ('""C:\Demo ^& Folder\demo.exe" "C:\Demo ^& Folder\data.csv""') do echo %%G
or add an escape to the outer set of quotes:
FOR /f "tokens=* delims=" %%G in ('^""C:\Demo & Folder\demo.exe" "C:\Demo & Folder\data.csv"^"') do echo %%G
If you are passing the filenames using variables, again you can Escape each special character with ^:
Set _exe="C:\Demo ^& Folder\demo.exe"
Set _datafile="C:\Demo ^& Folder\data.csv"
FOR /f "tokens=* delims=" %%G in ('"%_exe% %_datafile%"') do echo %%G
or add an escape to the outer set of quotes:
Set _exe="C:\Demo & Folder\demo.exe"
Set _datafile="C:\Demo & Folder\data.csv"
FOR /f "tokens=* delims=" %%G in ('^"%_exe% %_datafile%^"') do echo %%G
Finding literal carets is interpreted by Notepad4 as escaping the latter quote, leading to this highlighting mistake with open quotes (the latter image is the correct highlighting)


The text was updated successfully, but these errors were encountered: