Page 1 of 2
Unicode Editor with Search and Replace
Posted: Tue Oct 01, 2002 12:34 am
by BobLatimer
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.
Posted: Tue Oct 01, 2002 1:05 am
by dforrest
TexPad from Helios Software Solutions will do all of that and more. Available at
http://www.textpad.com/
An evaluation copy is available.
Posted: Tue Oct 01, 2002 2:25 am
by BobLatimer
Thanks mon.
Posted: Tue Oct 01, 2002 3:20 am
by BobLatimer
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?
Posted: Tue Oct 01, 2002 3:34 am
by mikesimpson
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.
Posted: Tue Oct 01, 2002 4:40 am
by BobLatimer
Thanks Mike. I'll give it a go.
Posted: Tue Oct 01, 2002 7:13 am
by numnutz
Word for Windows will do this

- also Dreamweaver I belive does this (don't know about the unicode support though)
Posted: Tue Oct 01, 2002 9:24 am
by Roger
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
Posted: Tue Oct 01, 2002 10:45 am
by kimdurose
Wordpad will do it too.
Posted: Tue Oct 01, 2002 11:30 am
by Fodda
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.
Posted: Tue Oct 01, 2002 11:52 am
by dforrest
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?
1. Open all the files you wants to change
2. Manu item Search | Repace (also on toolbar)
3. Type in the two strings, choose "All documents" and click on "Replace All"
Posted: Wed Oct 02, 2002 12:41 am
by BobLatimer
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.
Posted: Wed Jun 01, 2005 3:41 am
by dforrest
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?
Back to an old one!
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
,
Posted: Wed Jun 01, 2005 4:40 am
by ImCanadian
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!!
Posted: Wed Jun 01, 2005 9:45 am
by ianmacmillan
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.