Computing.Net > Forums > Disk Operating System > edit a blank space in text file??

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.

edit a blank space in text file??

Reply to Message Icon

Name: racked
Date: July 24, 2000 at 01:57:51 Pacific
Comment:

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 blah

blah blah blah blah blah blah blah blah
blah blah blah blah

in the above example, I would like to edit the first space only.

Thx



Sponsored Link
Ads by Google

Response Number 1
Name: racked
Date: July 24, 2000 at 02:00:46 Pacific
Reply:

Whoops!!!

I forgot to mention that I would like to edit this space from a batch file.


0

Response Number 2
Name: JR
Date: July 24, 2000 at 10:13:19 Pacific
Reply:

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.


0

Response Number 3
Name: racked
Date: July 24, 2000 at 11:16:28 Pacific
Reply:

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.


0

Response Number 4
Name: JR
Date: July 24, 2000 at 11:50:04 Pacific
Reply:

A truly bright person knows how to program.


0

Response Number 5
Name: racked
Date: July 24, 2000 at 18:43:04 Pacific
Reply:

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.

.


0

Related Posts

See More



Response Number 6
Name: racket
Date: July 24, 2000 at 19:57:42 Pacific
Reply:

Hmmm..

How about a batch that will remove all the carriage returns???


0

Response Number 7
Name: JR
Date: July 25, 2000 at 05:11:29 Pacific
Reply:

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.


0

Response Number 8
Name: DoOMsdAY
Date: July 25, 2000 at 06:55:39 Pacific
Reply:

Get QuickBasic and compile the thing into an executable. Should work fine everywhere.


0

Response Number 9
Name: racked
Date: July 25, 2000 at 18:05:10 Pacific
Reply:

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.


0

Response Number 10
Name: racket
Date: July 25, 2000 at 18:32:24 Pacific
Reply:

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.


0

Response Number 11
Name: mr o
Date: July 26, 2000 at 04:14:33 Pacific
Reply:

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.


0

Response Number 12
Name: racked
Date: July 26, 2000 at 10:03:28 Pacific
Reply:

Mr o - Sharing my surprise and the knowledge is what I had in mind.

No response to my e-mail yet.


0

Response Number 13
Name: racked
Date: August 2, 2000 at 22:15:48 Pacific
Reply:

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.


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: edit a blank space in text file??

replace chacters in text file www.computing.net/answers/dos/replace-chacters-in-text-file/14027.html

Delete all the lines in text file www.computing.net/answers/dos/delete-all-the-lines-in-text-file/16767.html

How Do I Pause The Viewing Of A Text File While In Pure DOS? www.computing.net/answers/dos/how-do-i-pause-the-viewing-of-a-text-file-while-in-pure-dos/5421.html