<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Possible bug found when processing nested parentheses in a batch script]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I’ve discovered that when using Notepad++ to edit batch files, it seems to have an issue keeping track of which parentheses pair up together in the file.  Obviously this doesn’t affect actual processing of the batch file when it’s run,  but it does make editing complex batch files rather difficult as I am relying on the parentheses to know where I’m at in the script.</p>
<p dir="auto">My “workaround” was to paste the batch file into an html file between two &lt;script&gt; tags so that it would correctly process the layers of parentheses so I could see where I’m at.  Of course, this means that I’m losing out on the other color coding for the batch variables, etc. however.</p>
<p dir="auto">Here is a link to a screenshot that illustrates the issue better:<br />
<a href="https://www.dropbox.com/s/udnqswdklol7232/Notepad%2B%2B%20Batch%20Editor%20Issue.PNG?dl=0" rel="nofollow ugc">https://www.dropbox.com/s/udnqswdklol7232/Notepad%2B%2B Batch Editor Issue.PNG?dl=0</a></p>
<p dir="auto">Thank you</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/10120/possible-bug-found-when-processing-nested-parentheses-in-a-batch-script</link><generator>RSS for Node</generator><lastBuildDate>Thu, 18 Jun 2026 13:51:28 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/10120.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 09 Sep 2015 19:46:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Possible bug found when processing nested parentheses in a batch script on Sun, 13 Sep 2015 22:40:39 GMT]]></title><description><![CDATA[<p dir="auto">Sure,</p>
<hr />
<p dir="auto">setlocal ENABLEDELAYEDEXPANSION<br />
echo ┌╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨╨┐&gt;&gt; SyncLog.log<br />
echo │ SYNC STARTED: %DATE% at %TIME% │&gt;&gt; SyncLog.log<br />
echo ├─────────────────────────────────────────────┘&gt;&gt; SyncLog.log<br />
for /F “skip=5 tokens=<em>" %%A in (SyncConfig.txt) do (<br />
for /F "tokens=3 delims=	,=, " %%B in (‘echo %%A^| findstr /i /c:“Source Drive”’) do (set SourceDrive=%%B)<br />
)<br />
for /F  "tokens=6-10 delims= " %%A in (‘dir !SourceDrive!^| findstr /i Volume^| findstr /v Serial’) do (<br />
set SourceDriveName=%%A %%B %%C %%D %%E<br />
echo │ The source drive is set to !SourceDrive! ^(!SourceDriveName!^)&gt;&gt; SyncLog.log<br />
)<br />
for /F "skip=9 tokens=</em>” %%A in (SyncConfig.txt) do (<br />
for /F %%B in (‘echo %%A^| findstr /i /v /c:“Not Included”’) do (<br />
if NOT EXIST %%B:\ (<br />
call :GetTime<br />
echo │ !CurrentTime!	%%B:\ does not exist and was not synced&gt;&gt; SyncLog.log<br />
)<br />
if EXIST %%B:\ (<br />
set NetworkDrive=FALSE<br />
for /F “skip=5 tokens=2 delims= " %%C in (‘net use^| findstr /v command’) do (if “%%B:”==”%%C" (set NetworkDrive=TRUE))<br />
if !NetworkDrive!==TRUE (<br />
call :GetTime<br />
echo ├ !CurrentTime!	%%B:\ is a network drive and was not synced&gt;&gt; SyncLog.log<br />
)<br />
if !NetworkDrive!==FALSE (<br />
title SYNCING !SourceDrive! TO %%B:<br />
robocopy /MIR !SourceDrive! %%B:<br />
title SYNC IS COMPLETE<br />
if %ERRORLEVEL% GEQ 8 (<br />
call :GetTime<br />
echo █►!CurrentTime!	An error occured when robocopy attempted to sync from !SourceDrive! to %%B:&gt;&gt; SyncLog.log<br />
)<br />
if %ERRORLEVEL% LSS 8 (<br />
for /F  "tokens=6-10 delims= " %%C in (‘dir %%B:^| findstr /i Volume^| findstr /i /v Serial’) do (<br />
call :GetTime<br />
echo ├►!CurrentTime!	%%B:\ ^(%%C %%D %%E %%F %%G^) was successfully synced with !SourceDrive! ^(!SourceDriveName!^)&gt;&gt; SyncLog.log<br />
)<br />
)<br />
)<br />
)<br />
)<br />
)<br />
endlocal<br />
echo ├─────────────────────────────────────────────┐&gt;&gt; SyncLog.log<br />
echo │ SYNC ENDED:   %DATE% at %TIME% │&gt;&gt; SyncLog.log<br />
echo └╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥╥┘&gt;&gt; SyncLog.log<br />
goto :eof<br />
:GetTime<br />
set CurrentTime=%TIME%<br />
goto :eof</p>
<hr />
]]></description><link>https://community.notepad-plus-plus.org/post/11111</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/11111</guid><dc:creator><![CDATA[Josiah Deal]]></dc:creator><pubDate>Sun, 13 Sep 2015 22:40:39 GMT</pubDate></item><item><title><![CDATA[Reply to Possible bug found when processing nested parentheses in a batch script on Thu, 10 Sep 2015 15:19:34 GMT]]></title><description><![CDATA[<p dir="auto">Could you paste the actual text so we can copy/paste it ourselves into N++?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/10979</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/10979</guid><dc:creator><![CDATA[dail]]></dc:creator><pubDate>Thu, 10 Sep 2015 15:19:34 GMT</pubDate></item></channel></rss>