Code: Select all
@echo off
cls
setlocal disableDelayedExpansion
set "file=.pd"
set "search=listschedtasks /newtask /userinput=1 "
for /f "delims=" %%A in ('findstr /i /c "%search%" "%file%"') do (
set "ln=%%A"
set /p k=Enter time to run program:
set /p l=Do you want a reccuring date? (enter lowercase y/n)
if /i _"%l%"==_"y" (goto recurdate)
at %k% "!ln:*%search%=!"
:recurdate
set /p m=Enter a recurring date:
at %k% %m% !ln:*%search%=!
setlocal enableextensions
break
endlocal)
if %errorlevel%==1 (goto c)
goto :eof
there are a collection of errors. Here is what it says (I click and drag the program into cmd and run it:)
ERROR 1: "FINDSTR- /c IGNORED"
ERROR 2: "Cannot open a.pd"
ERROR 3: "Invalid command"
ERROR 4: (it starts the help file for "at")
What am I doing wrong and how can I fix it?
Regards,
Rileyh