Re: not working
This one should work:This fails in CMD -- what is "SET rpath=%~1" supposed to do? In CMD on my
system (Server 2008), it removes RPATH from the environment, as %~1 AFAIK
doesn't have any meaning. So the subsequent "set rpath=!rpath:%CD%\=!" does
nothing, and "rpath" is empty when it returns to the FOR loop. All I get is
a lot of "echo is off" messages from the FOR loop.
@echo off setlocal enabledelayedexpansion for /R %%i in (.) do ( call :rpath "%%~i" echo !rpath! ) endlocal GOTO :EOF rem sub rpath(filename) OUT: %rpath% :rpath rem debug print %1 here echo (rpath: %1) SET rpath=%~1 set rpath=!rpath:%CD%\=! GOTO :EOF