Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi
Is there a way to edit a large blank area in a text file.
Example:
blah blah blah blah blah blah blah blah
blah blah blah blah
blah blah blah blah blah blah blah blah
blah blah blah blahblah blah blah blah blah blah blah blah
blah blah blah blahin the above example, I would like to edit the first space only.
Thx

Mr. racket, there are limits to what you can do and not do with the simple built-in batch language. If you are into auto-editing files and stuff like that, you must consider writing the program in a real programming language, or at least Qbasic.

Thank you for your reply JR.
I was afraid that this might be the case.
I was hoping that some truly bright person might have figured a way around this batch file limitation.Thanks again.

Well that certainly is not true JR.
I know too many people that can program but don't fit that description.
The item that I am working on cannot be done with Qbasic because of the computers it is intended to run on.
C++ or another language might be the way to go, but I was hoping to find an unusual pipe trick or DOS utility.
.

What kind of computer does not run Qbasic programs? The only requirement I have heard is 286 CPU or better, so unless you are using XT's or something ...
Still, the batch language is supposed to do stuff like moving files and running programs, but it isn't meant to move stuff around inside the actual files. Think of it again. A C program that does the thing for you takes a few minutes to write.

JR - What kind of computer does not run Qbasic programs??
The ones that don't have Qbasic of course.
Thank you DoOMsdAY for your excellent suggestion to compile it so that it will run on all the IBM compatable computers regardless if they have Qbasic or not.
I have a co-worker that seems to know every aspect of DOS and batch.
I will e-mail him this question.
The space in the text I have refered to is actually created by batch input to a text file.
If he comes up with a DOS trick that can do the batch editing that I was wondering about, I will come back and post the information here.Thank you folks for your input.

Ps.
I just read my final reply above.
Looks like it might be worded badly.I don't want you guys to misunderstand.
I believe that you are most likely correct about the batch editing.
I thought as much when I posted the question.
I just didn't want to write and compile a program to replace a batch program that is used successfully by quite a few for cosmetic reasons.When I said I'll come back if I find something, it would only be to share my suprise with you.
Thanks all.

so if you find a way to do it, youll come back only to share your surprize with us?
Why not come back and tell us how you did it?
share some knowledge with the people who normally share theres.

Mr o - Sharing my surprise and the knowledge is what I had in mind.
No response to my e-mail yet.

Well folks, I received a reply from my co-worker regarding this subject.
I was thrilled by the extrodinary amount of knowledge that he displayed, but the answer was to this question was avoided leaving me to believe that there is no way to edit a space in a text file from a batch file.
He generously dwelled on a few really inovative ways to improve the batch that I refered to earlier.
I tried them out and there was a cosmetic improvement.
However, it seems that your replies have been somewhat confirmed.
I vaguely remember encountering a DOS program last year that took out all the spaces and turned everything into a run-on sentence, but I can't remember where I saw this.Oh well, so it goes.
Thanks again for your input.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |