Chat LIVE With Programming Experts! There Are 23 Online Right Now...

Welcome to Dream.In.Code
Become an Expert!

Join 244,296 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 858 people online right now. Registration is fast and FREE... Join Now!




Auto answer batch file prompt

 
Reply to this topicStart new topic

Auto answer batch file prompt

knockkneed81
17 Nov, 2008 - 10:22 AM
Post #1

New D.I.C Head
*

Joined: 5 Nov, 2008
Posts: 14


My Contributions
Batch file is asking if the file that I am copying is a F=file or D=directory I want to automatically answer "F" for file.

User is offlineProfile CardPM
+Quote Post


muballitmitte
RE: Auto Answer Batch File Prompt
18 Nov, 2008 - 11:02 PM
Post #2

D.I.C Head
Group Icon

Joined: 5 Nov, 2008
Posts: 81



Thanked: 9 times
Dream Kudos: 75
My Contributions
please post some code so i`ll know what you mean!!!!!

~~~~~

normally...
if a command asks for a confirmation or smth you could use the pipe operator like this:
CODE

echo y | del <directoryName>

User is offlineProfile CardPM
+Quote Post

no2pencil
RE: Auto Answer Batch File Prompt
18 Nov, 2008 - 11:45 PM
Post #3

Unix Ronin
Group Icon

Joined: 10 May, 2007
Posts: 10,438



Thanked: 198 times
Dream Kudos: 2725
Expert In: Goofing Off

My Contributions
It's probably overkill for what you are trying to accomplish, but there is a program called expect that allows you to setup events at the command prompt such as you are describing. Take a look & see if it'll work for you.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 7/4/09 04:41PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month