|
-
Oct 5th, 2000, 08:16 AM
#1
Thread Starter
Member
i created a batch file, and my first command is
cd\
c:
file2cd c:\tester
cdtools /eject
so when the cd\ execute, it goes automatically to the next line, but after the file2cd command, i nne another ENTER before going to the cdtools command, is there a way to tell him to do a enter with a command.
thanxs
-
Oct 5th, 2000, 08:25 AM
#2
Frenzied Member
I'm not sure, but I think you are asking if there is a way to make the batch file wait before executing the cdtools /eject command.
If this is correct, put the pause command between the file2cd and cdtools commands. Nothing will happen until the user presses a key.
Code:
cd\
c:
file2cd c:\tester
pause
cdtools /eject
-
Oct 5th, 2000, 08:30 AM
#3
Frenzied Member
I'm with ccoder; that sounds to me like what you need.
Is it?
-
Oct 5th, 2000, 08:30 AM
#4
Hyperactive Member
Yep
Coder is right, the pause command will pause until any keey is entered.......You can also add Echo blah blah to walk the person through whats going on so they dont stare at a black screen....assuming you used the cls to clear the commands being entered.
-RaY
VB .Net 2010 (Ultimate)
-
Oct 5th, 2000, 12:55 PM
#5
in dos...
at a prompt...
type this:
copy con enter.bat
'now press the <Enter> key
'and then press the <F6> function key and
'then <Enter> key again to save.
'this batch file will, when called, press
'Enter for you.
then in place of the pause type the batch file <enter>
cd\
c:
file2cd c:\tester
enter
cdtools /eject
-
Oct 5th, 2000, 01:36 PM
#6
Frenzied Member
Two things....
1) You had better use call enter.bat rather than enter or you will never execute the line cdtools /eject. At least that is my experience running cmd.exe (as opposed to command.com) on an NT workstation.
2) I guess I fail to see what pressing enter (or simulating it) between the 2 commands will do for you. I noticed that you posted another message come back to batch seeking the same answer. Can you enlighten me as to what you are attempting to do?
-
Oct 5th, 2000, 01:54 PM
#7
Thread Starter
Member
i'm using a shell command in visual basic that call a batch file, shell "shell.bat",vbhide
in my batch file there is a particular command
file2cd ("path"), the problem is that i don't see dos cause it's got to be in hide mode, so dos is asking ("if u like to proceed press ENTER or like to cancel press CTL-C.
So in my batch file, i would like to say to DOS to proceed and by procedding u must press enter in dos.So there must be something i can do in my batch file , a command of a sort to activate the enter button .
Sorry my english, i suck
-
Oct 5th, 2000, 02:38 PM
#8
Frenzied Member
Okay, if I understand this, is it DOS that is prompting you to press Enter or Ctrl-C, or is it really the command file2cd?
If it is file2cd then it might be tricky to respond to it. Especially if file2cd doesn't support I/O redirection.
It's been quite a while since I did any real batch programming. I seem to remember seeing something at one time or another that was similar to what you are trying to do. Let me look into this and see what I can come up with.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|