@echo on &setlocal
setlocal enableDelayedExpansion
If "%computername%" == "DTCVDI-V33-0951" (
SET NS=\\xx
SET OPSDIR=!NS!\ProAdmin
SET COGDIR=!NS!\CREM
)
set "list=%COGDIR%\Config\Copy_Daily_EMTS_Reporting.txt"
echo %list%
pause
Here the list shows \\xx\CREM \Config\Copy_Daily_EMTS_Reporting.txt
.
Why this space shows and how to remove this?