:SCHTASKS set fullpath=%~f0 set prev=EBS_ schtasks /create /tn %prev%%~1 /tr "%fullpath% %~1" /sc DAILY /st %~2 /f goto:eof