A batch file conundrum -
i using windows xp.trying create batch file work location in response user input.it works fine except glitch.if user inputs
c:\documents , settings\username\desktop\file.txt
the following batch works fine:
set /p x= file ? set /p =number: <nul find /v /c "" <%1 %x%> linecount.txt msg %username%<linecount.txt || start linecount.txt del linecount.txt.
but if assume user computer saavy , use path
%userprofile%\desktop\file.txt
with or without quotes batch file fails message system cannot find path!. @ wits end.
i might wrong think % has after %userprofile.
in case be:
%userprofile%\desktop\file.txt
Comments
Post a Comment