Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
DOS Redirect input in batch file
Name: MichaelLoveUSA Date: October 8, 2004 at 09:28:44 Pacific OS: Win2000 CPU/Ram: NA
Comment:
I am trying to run sqlplus commands in a batch file. I want to know if I can use the << command similar to Unix(ksh) or if I have to use < and put my commands in an input file. Here is the code I am trying to run:
sqlplus -s %DBUSER%\%DBPASS%@%DBSERVER% << EOF delete from normalized_guest_cards_1 where community = '%1%'; commit; delete from normalized_guest_cards_2 where community = '%1%'; commit; delete from normalized_lease_data_1 where community = '%1%'; commit; delete from normalized_lease_data_2 where community = '%1%'; commit; quit; EOF
Name: MichaelLoveUSA Date: October 8, 2004 at 09:54:41 Pacific
Reply:
Nevermind! I had my slash backwards! Am I unix or am I DOS? That is the question...
0
Response Number 2
Name: MichaelLoveUSA Date: October 8, 2004 at 09:57:35 Pacific
Reply:
Oops, that only got my connection working. Still an issue. Ideas?
0
Response Number 3
Name: gary henderson Date: November 3, 2004 at 15:37:45 Pacific
Reply:
I too want to know how to something similar. Perhaps you can help me. I can send ASCII commands to control a device through com1: for instance but how do I get data back to display in DOS? In my case, I am sending a command to a device that is supposed to give me the firmware version it is running. If using Hyperterminal in Windows XP, it comes back as "2.97" which is correct. But in a batch file using DOS, how can I get this response to display while running the batch file? Maybe someone out there has a small program that can send a simple string out of the com port of choice and capture the response for printing?
Summary: What does the percent sing mean in batch files. i am really confused about that. it seems like i ve seen it used in different ways. Does it set declare variable or what? thank you. using dos 6.22...
Summary: sir how i can use variables in batch files i need to receive return values from c -exe files to batch file variables and i want to check the values in the batch files ...