NEED HELP!

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Rileyh
Posts: 147
Joined: 01 Sep 2011 03:54
Location: Perth, Western Australia

NEED HELP!

#1 Post by Rileyh » 13 Nov 2011 20:03

When I run this program (a portion of a program):

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

Post Reply