windows 7 batch script- if statement not working -


cd c:\users\user1\desktop  if "%time:~0,1%" == " " ren 85.txt %time:~1,1%.txt  else ren 85.txt %time:~o,1%.txt   pause  

the script above not working, if put following line file:

ren 85.txt %time:~1,1%.txt  

it working.

why if...else statement above not working?

o doesn't work, try 0 (zero):

 cd c:\users\user1\desktop  if "%time:~0,1%"==" " (ren 85.txt %time:~1,1%.txt  ) else ren 85.txt %time:~0,1%.txt   pause  

Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -