Unicode Editor with Search and Replace
Moderator: Moderators
-
BobLatimer
- Very Active Forum Member
- Posts: 2765
- Joined: Mon Jan 07, 2002 12:00 am
- Location: Auckland, New Zealand
Unicode Editor with Search and Replace
I'm looking for a Unicode editor that will do a search and replace, i.e. I want to point it at a folder, have it search every file in that folder and its sub-folders for a specified string and then replace it whenever it finds it.
Does anyone know of an editor that will do this?
I'm planning to change my sound and cab aliasing and want to change, for example, every occurrence of "../../CommonSounds/ to "../../../../CommonSounds/ in every file in the Trainset folder.
Does anyone know of an editor that will do this?
I'm planning to change my sound and cab aliasing and want to change, for example, every occurrence of "../../CommonSounds/ to "../../../../CommonSounds/ in every file in the Trainset folder.
- dforrest
- Very Active Forum Member
- Posts: 6187
- Joined: Wed Jun 05, 2002 12:00 am
- Location: St. Vincent and the Grenadines (and in an earlier life, Hull)
TexPad from Helios Software Solutions will do all of that and more. Available at http://www.textpad.com/
An evaluation copy is available.
An evaluation copy is available.
-
BobLatimer
- Very Active Forum Member
- Posts: 2765
- Joined: Mon Jan 07, 2002 12:00 am
- Location: Auckland, New Zealand
-
BobLatimer
- Very Active Forum Member
- Posts: 2765
- Joined: Mon Jan 07, 2002 12:00 am
- Location: Auckland, New Zealand
Had a look at Textpad.
As far as I could figure out, it will do a "Replace" in the current open file(s) and will do a "Find in Files" and find the occurences in all files in a specified folder.
What I want to do is a "Replace in Files" i.e. point it at the Trainset folder and tell it to replace one particular string with another in all the files in that folder. It doesn't appear to do that.
Have I missed something?
As far as I could figure out, it will do a "Replace" in the current open file(s) and will do a "Find in Files" and find the occurences in all files in a specified folder.
What I want to do is a "Replace in Files" i.e. point it at the Trainset folder and tell it to replace one particular string with another in all the files in that folder. It doesn't appear to do that.
Have I missed something?
- mikesimpson
- Very Active Forum Member
- Posts: 6361
- Joined: Mon Dec 03, 2001 12:00 am
- Location: Southern Hemisphere Penal Colonies
- Contact:
Hi Bob,
I always use Ultra-Edit for my editing. It includes a Replace in Files item which also has a unicode option, so should do everything you need.
See http://www.ultraedit.com - it is shareware, but I think its the best you can get.
I always use Ultra-Edit for my editing. It includes a Replace in Files item which also has a unicode option, so should do everything you need.
See http://www.ultraedit.com - it is shareware, but I think its the best you can get.
Mike in OZ - Author of TS-Tools & Route-Riter.
http://www.agenetools.com
I'm not arguing (just explaining why I'm right).
http://www.agenetools.com
I'm not arguing (just explaining why I'm right).
-
BobLatimer
- Very Active Forum Member
- Posts: 2765
- Joined: Mon Jan 07, 2002 12:00 am
- Location: Auckland, New Zealand
latimers - I think you may find a freeware program called Agent Ransack can do what part of what you want. It will search a defined set of directories for a text string, and then display the results in an Explorer-style window. You can then open each listed file found in your Unicode editor and use its own search and replace function - I find Editor2 (also free) is very good for this as a more powerful alternative to Wordpad.
http://www.agentransack.com
http://netez.com/2xExplorer
http://www.agentransack.com
http://netez.com/2xExplorer
- kimdurose
- Established Forum Member
- Posts: 304
- Joined: Fri Nov 09, 2001 12:00 am
- Location: East Midlands, UK
- Contact:
Wordpad will do it too.
Kim Durose
http://www.kimsim.co.uk
"British Railways Projects for Microsoft Train Simulator"
<IMG SRC="http://album.atomic-systems.com/showPic ... Kimsim.jpg">
http://www.kimsim.co.uk
"British Railways Projects for Microsoft Train Simulator"
<IMG SRC="http://album.atomic-systems.com/showPic ... Kimsim.jpg">
- Fodda
- Very Active Forum Member
- Posts: 6157
- Joined: Fri Feb 22, 2002 12:00 am
- Location: Bristol, England
There's a brand new file in the 'other place' called unischv1.zip I quote
"Searches selected path and subdirectories for files that contain specified content. Works on Ansi, Unicode, Unicode Compressed and ZIP file contents. Requires MSTS intalled. By Martyn T. Griffin"
Not sure if it'll do all you want, but as it's MSTS specific, it could be well worth looking at.
"Searches selected path and subdirectories for files that contain specified content. Works on Ansi, Unicode, Unicode Compressed and ZIP file contents. Requires MSTS intalled. By Martyn T. Griffin"
Not sure if it'll do all you want, but as it's MSTS specific, it could be well worth looking at.
- dforrest
- Very Active Forum Member
- Posts: 6187
- Joined: Wed Jun 05, 2002 12:00 am
- Location: St. Vincent and the Grenadines (and in an earlier life, Hull)
1. Open all the files you wants to changelatimers wrote:Had a look at Textpad.
As far as I could figure out, it will do a "Replace" in the current open file(s) and will do a "Find in Files" and find the occurences in all files in a specified folder.
What I want to do is a "Replace in Files" i.e. point it at the Trainset folder and tell it to replace one particular string with another in all the files in that folder. It doesn't appear to do that.
Have I missed something?
2. Manu item Search | Repace (also on toolbar)
3. Type in the two strings, choose "All documents" and click on "Replace All"
-
BobLatimer
- Very Active Forum Member
- Posts: 2765
- Joined: Mon Jan 07, 2002 12:00 am
- Location: Auckland, New Zealand
Thanks for all of the suggestions.
Being basically lazy or too busy or something, the thought of manually opening 2,000 or so .eng and .wag files didn't appeal to me.
The solution was Ultra-Edit as suggested by Mike Simpson.
Using it, all you need to do is enter old string, new string, type of file (*.eng, *.wag) and highest level folder (Trainset), tick Unicode and include subfolders (or something similar). Once you hit Go, it warns you you might be about to do significant damage to your files. If you continue despite that, it does the job. Very useful.
Not only that, my restructured aliasing works!
For anyone that's interested, I moved my CommonSounds and CommonCabs folders to the Train Simulator folder, so had to change the references in the .eng, .wag and .cvf files. The reason for that was so that I didn't have to include a copy in each "set" of routes that I swap in and out of the Train Simulator folder. It saved me about 1Gb of space.
Thanks again Mike.
Being basically lazy or too busy or something, the thought of manually opening 2,000 or so .eng and .wag files didn't appeal to me.
The solution was Ultra-Edit as suggested by Mike Simpson.
Using it, all you need to do is enter old string, new string, type of file (*.eng, *.wag) and highest level folder (Trainset), tick Unicode and include subfolders (or something similar). Once you hit Go, it warns you you might be about to do significant damage to your files. If you continue despite that, it does the job. Very useful.
Not only that, my restructured aliasing works!
For anyone that's interested, I moved my CommonSounds and CommonCabs folders to the Train Simulator folder, so had to change the references in the .eng, .wag and .cvf files. The reason for that was so that I didn't have to include a copy in each "set" of routes that I swap in and out of the Train Simulator folder. It saved me about 1Gb of space.
Thanks again Mike.
- dforrest
- Very Active Forum Member
- Posts: 6187
- Joined: Wed Jun 05, 2002 12:00 am
- Location: St. Vincent and the Grenadines (and in an earlier life, Hull)
Back to an old one!latimers wrote:Had a look at Textpad.
As far as I could figure out, it will do a "Replace" in the current open file(s) and will do a "Find in Files" and find the occurences in all files in a specified folder.
What I want to do is a "Replace in Files" i.e. point it at the Trainset folder and tell it to replace one particular string with another in all the files in that folder. It doesn't appear to do that.
Have I missed something?
The TextPad people have recently released WildEdit, a companion programme to TextPad which does just this. It will be invaluable for making global changes in the MSTS file hierarchy. I have downloaded it and registered it (£8.50). A limited-use evaluation version is available.
http://www.textpad.com/products/wildedit/index.html
,
-
ImCanadian
- Getting the hang of things now
- Posts: 93
- Joined: Mon Feb 14, 2005 10:37 pm
Latimers
What's about the ConTEXT Editor that Peter Williard is using for his MsTS. And you should check for more information on the link below:
http://steam4me.railpage.org.au/trainsi ... ntext.html
Hope that will help you to decide if that is the one you are looking for. I have not try myself yet but have read the messages through Trainsim and other train forum messages that most train simmers are using this program.
Thank you
John P. Mackay
Belleville, ON Canada eh!!
What's about the ConTEXT Editor that Peter Williard is using for his MsTS. And you should check for more information on the link below:
http://steam4me.railpage.org.au/trainsi ... ntext.html
Hope that will help you to decide if that is the one you are looking for. I have not try myself yet but have read the messages through Trainsim and other train forum messages that most train simmers are using this program.
Thank you
John P. Mackay
Belleville, ON Canada eh!!
- ianmacmillan
- Very Active Forum Member
- Posts: 9588
- Joined: Fri Feb 28, 2003 12:39 pm
- Location: N. Lanarkshire Scotland
I have been using a similar idea for the last 18 months.
I put the common folders in a folder called "Aliased" in the Trains folder along with the default locos.
My locos now alias to
..\\..\\..\\aliased\\scotsman\\cabview\\etc
or
..\\..\\..\\aliased\\common.cab\whatever
My Aliased folder is now bloated to 1.9gig. This allows me to keep seperate Trainset folders for each route without duplicating too much.
I believe it also speeds up MSTS as it is not read at startup.
I edit most files manually as some files skip from one common folder to another using ..\\ Other alias to the main sound folder using ..\\..\\..\\sound or to the default loco looking for coupling compressor or fuel .wavs which are in the main sound folder.
I use Context find and replace which has the advantage of remembering previous entries.
I now include in each folder in the common folder a Sound and Cabview folder containing the aliased .cvf and sms files which I can simply copy into each loco and I delete any aliasing in the .eng file.
I'd be interested to know if any more people have the common folders in a different place.
I put the common folders in a folder called "Aliased" in the Trains folder along with the default locos.
My locos now alias to
..\\..\\..\\aliased\\scotsman\\cabview\\etc
or
..\\..\\..\\aliased\\common.cab\whatever
My Aliased folder is now bloated to 1.9gig. This allows me to keep seperate Trainset folders for each route without duplicating too much.
I believe it also speeds up MSTS as it is not read at startup.
I edit most files manually as some files skip from one common folder to another using ..\\ Other alias to the main sound folder using ..\\..\\..\\sound or to the default loco looking for coupling compressor or fuel .wavs which are in the main sound folder.
I use Context find and replace which has the advantage of remembering previous entries.
I now include in each folder in the common folder a Sound and Cabview folder containing the aliased .cvf and sms files which I can simply copy into each loco and I delete any aliasing in the .eng file.
I'd be interested to know if any more people have the common folders in a different place.