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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -