was unexpected at this time

May 23, 2009 at 02:37:23
Specs: Windows XP
hi,

following command works fine on command line. But in bacth file it gives error : was unexpected at this time.

for /F "tokens=2-4 delims=/ " %i in ('date /t') do ren temp1.tar %k%i%j.tar


See More: was unexpected at this time

Report •


#1
May 23, 2009 at 03:15:37
If it's a batch file then %i should be %%i, %i would only work from the commandline.

Report •

#2
May 23, 2009 at 03:51:31
hi,

Thanks alot it worked fine after replacing with %%i


Report •

Related Solutions


Ask Question