Simple Windows XP command line (batch file) help.

Afternoon everyone,  I've got a minor issue with putting together a batch file for use under Windows XP.

All it does is copy files from the CD to the HDD, run the executable, then, upon closing the program, deletes the files and folder it copied before.

So far,  everything works except for this one little hitch.

I'd like to automate the deletion process where it won't ask "Are you sure? Y/N".  All of my age-old /y and -y switches don't seem to work anymore.

Does anyone know how I could accomplish this under XP?
Who is Participating?
Are you using del ??
You can use
  del /F/Q/S <dir_name>
Here /F is for force, /Q for quiet mode and /S for entire subdirectory tree.
Use the  'rmdir' or 'rd' command with the /S option.
For files use:

echo y | del %1\*.*

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

depending on what the command is, the switch might vary.

Isolate the troublesome command and issue a
command /help or /? separately.

depending on what that help tells you change the line in your batch file
KenO1964Author Commented:
I apologize for not being a little more precise in my initial description.  I am using "del" for the files in the directories (1 main dir and 1 sub dir) and "rd" for the dir's.

Using kumvjuec's proposal, with a few very slight modifications (for the "rd" parts) I was able to get everything working fine

Many thanks for everyone who responded,  all of your input was very useful.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.