Код:

@echo off
setlocal enableextensions enabledelayedexpansion
set sSourceFile=C:\Мои проекты\0101\0001.txt
if exist "%sSourceFile%" (
<"%sSourceFile%" set /p sPath=
if defined sPath (
set sPath=!sPath:\=\\!
echo [!sPath!]
) else (
echo [%sSourceFile%] is empty.
exit /b 2
)
) else (
echo Can't find source file [%sSourceFile%].
exit /b 1
)
endlocal
exit /b 0