batch file - windows .BAT Error The system cannot find the path specified -


for /f "tokens=*" %%a in ('dir /od /b %* ^| tail -n 1') set my_t2=%%a  echo %my_t2% 

running above .bat file in windows 7 enterprise command prompt terminal

c:\tools>t2.bat  c:\tools>for /f "tokens=*" %%a in ('dir /od /b ^| tail -n 1') set my_t2=%%a system cannot find path specified.  c:\tools>set my_t2=t2.bat  c:\tools>echo t2.bat t2.bat 

why error "the system cannot find path specified."

if change above .bat file output gets redirected file , set variable redirected output file, don't above error.

c:\tools>t1.bat  c:\tools>dir /od /b    | ttail -n 1  1>g:\t1.txt  c:\tools>set /p my_t1= 0<g:\t1.txt  c:\tools>echo t1.bat t1.bat  c:\tools> 

how fix error without being forced redirect command output file ?

i had earlier added clink plugin cmd, command prompt. recently, removed clink's directory didn't uninstall -- rendering situation cmd.exe still searching it. since cmd.exe didn't find clink, giving error "the system cannot find path specified."

that explains all.


Comments