要echo出一个带特殊字符,变量和命令的P出来,应该怎么写呢
需要生成的%temp%\2.cmd
@echo off &Setlocal EnableDelayedExpansion
sc config Schedule start= AUTO
net start Scheduler
for /f "tokens=1,2* delims=:" %%a in ("%time%") do (
set /A tm=%%b+1
set /A tm=!tm!%%60
set tm1=%%a:!tm!
at !tm1! c:\delcopyrar.bat
)
下面的在变量%%a,%%b,%time%,%%60处有问题,我不会解决,应该如何改正,
望高手指教,双击的1.bat应该生成%temp%\2.cmd:
@echo off
echo @echo off ^&Setlocal EnableDelayedExpansion>%temp%\2.cmd
echo sc config Schedule start= AUTO >>%temp%\2.cmd
echo net start Scheduler >>%temp%\2.cmd
echo for /f "tokens=1,2* delims=:" %%a in ("%time%") do ( >>%temp%\2.cmd
echo set /A tm=%%b+1 >>%temp%\2.cmd
echo set /A tm=^!tm^!%%60 >>%temp%\2.cmd
echo set tm1=%%a:^!tm^! >>%temp%\2.cmd
echo at !tm1! c:\delcopyrar.bat >>%temp%\2.cmd
echo ) >>%temp%\2.cmd
Last edited by qingfushuan on 2007-6-1 at 06:24 PM ]