Computing.Net > Forums > Windows XP > Replace spaces with

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.

Replace spaces with

Reply to Message Icon

Name: Yelena
Date: August 19, 2009 at 07:59:09 Pacific
OS: Windows XP
Subcategory: General
Comment:

I need to reformat a text file:

To change it from :

1 35627.52 0.60 ---------- 245.65 ----------
2 36176.54 1.27 ---------- 249.44 ----------
3 35669.11 1.64 325.62 245.94 2.25
4 35928.33 3.03 35124.00 247.73 242.18
5 35490.21 4.85 33769.26 244.70 232.84


to :


1,35627.52,0.60,0,245.65,0
2,36176.54,1.27,0,249.44,0
3,35669.11,1.64,325.62,245.94,2.25
4,35928.33,3.03,35124.00,247.73,242.18
5,35490.21,4.85,33769.26,244.70,232.84


I need to
1. delete all leading spaces
2. replace all spaces with ','
3. replace '----------' witth '0'

Could you please help with the code?

Yelena



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: August 19, 2009 at 09:42:24 Pacific
Reply:

Why not load it into Notepad and use the inbuilt search and replace function. Sgouldn't take more than a couple of minutes.

Stuart


0

Response Number 2
Name: Yelena
Date: August 19, 2009 at 10:36:29 Pacific
Reply:

Sorry, I did not explain what exactly I need.
There will be a lot of files similar to this created by testing device. I need a script that will re-format these files as they appear in the direcory and move to other directory from which they will be fetched by the real time application. There were more filtering required and somebody (Ivo) on this forum helped me with it. Original file has some lines at the beginning and the end that needed to be deleted. Now I need more.
Any help will be greatly appreciated

Kind Regards,
Yelena


0

Response Number 3
Name: Dumbob
Date: August 19, 2009 at 11:50:43 Pacific
Reply:

Programming Forum??

There is nothing to learn from someone who already agrees with you.


0

Response Number 4
Name: Yelena
Date: August 19, 2009 at 11:56:26 Pacific
Reply:
0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


OS shutdown on cmd mode update ms servers



Post Locked

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


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Replace spaces with

How to replace XP with 98SE on new box? www.computing.net/answers/windows-xp/how-to-replace-xp-with-98se-on-new-box/9470.html

Replacing Win98SE with XP www.computing.net/answers/windows-xp/replacing-win98se-with-xp/63256.html

Replace NotePad with NoteTab in XP www.computing.net/answers/windows-xp/replace-notepad-with-notetab-in-xp/153721.html