|
|
|
Batch [READ FROM FILE THEN ECHO ]
|
Original Message
|
Name: JordanVash
Date: July 12, 2007 at 03:05:46 Pacific
Subject: Batch [READ FROM FILE THEN ECHO ]OS: XPCPU/Ram: 2gig |
Comment: How would i read text from a certin file, and then echo it back to dos. I know the way u can echo to dos is something like echo bla bla >> Bla.txt. How would i read stuff from bla.txt, and echo it back into dos prompt?
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: Mechanix2Go
Date: July 12, 2007 at 03:13:19 Pacific
|
Reply: (edit)If it's XP, forget DOS. By 'echo to the prompt' do you mean 'put it on the screen'? [Rather than in a file?]
===================================== If at first you don't succeed, you're about average.M2
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: JordanVash
Date: July 12, 2007 at 03:37:50 Pacific
|
Reply: (edit)Heh i still call it dos, considering its ms-dos. But anyway. What i meant was.. Say i had a file named boobs.txt and it had jordan is god in the text file how would i display what is in the text file (jordan is god) into the cmd.exe (ms-dos). Like it reads the text file, and what ever is there it displays on ms-dos
Report Offensive Follow Up For Removal
|
|
Response Number 6
|
Name: Mechanix2Go
Date: July 12, 2007 at 15:43:38 Pacific
|
Reply: (edit)"did not work" Doesn't say much. What might help is to say what it DID; or what it DIDN'T DID. ===================================== If at first you don't succeed, you're about average.M2
Report Offensive Follow Up For Removal
|
|
Response Number 7
|
Name: FishMonger
Date: July 12, 2007 at 17:36:03 Pacific
|
Reply: (edit)You're going to need to come up with a different way of explaining what you want. Based on your current description, both methods that we've given will do what you asked.
Report Offensive Follow Up For Removal
|
|
Response Number 8
|
Name: tonysathre
Date: July 13, 2007 at 11:57:13 Pacific
|
Reply: (edit)Like they both said, to display the contents of a text file to STDOUT run this command: type boobs.txt Make sure the file you are trying to display is in your current working directory. If it is not, you need to CD to that directory. For example, if boobs.txt is on your Desktop, do this: Start | Run | cmd and hit Enter | cd desktop | type boobs.txt @M2, What is con used for? In the past I've used it to create files like this: copy con filename.txt text ... ^z But what other uses does it have, and what does it actually do? Thanks, Tony "Computer security." — Oxymoron
Report Offensive Follow Up For Removal
|
|
Response Number 9
|
Name: Mechanix2Go
Date: July 14, 2007 at 04:50:32 Pacific
|
Reply: (edit)Hi Tony, con is 'the console'; stdout goes to 'the screen'. So in your example: copy con filename.txt boils dowm to: copy what I put on the screen to filename.txt ================== similarly copy somefile con means put what's in somefile onto the screen. For most purposes you don't want the '1 file copied' msg so you: copy somefile con > nul which redirects stdout to nul; nul is the 'bit bucket'. What goes in there never comes out. Somewhat like a black hole. But Stephen Hawking is still working on that. ================================== As to orig post, you can TYPE or COPY without chamgimg dirs. type x:\some\other\place\somefile HTH
===================================== If at first you don't succeed, you're about average.M2
Report Offensive Follow Up For Removal
|
|
Response Number 10
|
Name: tonysathre
Date: July 14, 2007 at 13:59:49 Pacific
|
Reply: (edit)"As to orig post, you can TYPE or COPY without chamgimg dirs." Yes, I know. I just figured he wasn't in the correct directory, and wasn't putting the full path. "Computer security." — Oxymoron
Report Offensive Follow Up For Removal
|
Use following form to reply to current message:
|
|

|