How to apply multiple replacements in multiple text files at the same time

 

0 Comments | Write a Comment | Rate this Article | Report Article

 

Type

Tipp for Beginners

Category

Bussiness and Office

Language

English

Author

Stefan Trost Media

Date

07.07.2011

Ratings

20

Views

1721
 
 


About the author

Stefan Trost is a developer of software and web solutions and gladly also cares about your needs and desires. Contact

Profile of Stefan Trost Media
Articles by Stefan Trost Media

With a normal text editor, you can waste a lot of time. If you only can edit one file at a time and if only one replacement is possible at the same time, it spends alot of time untill you have replaced many replacements in multipe files. In this tipp, we will show you, how you can apply several replacements on several text files at the same time. For example, you can replace some text in all of your homepage files very easily and quickly.

Required software

You need the software Text Converter, which can be downloaded for free in the basic version. For this tipp, the free basic version is completely enough. The software works without an installation and can be started directly.

In a view words

Drag the files into the Text Converter, click on "Replace Text" in the actions, enter all of your replacements and then select a location for saving the edited files. When everything is finished, click on "Convert and Save".

First step: Select files

After starting the program, you can easily drag all the files that should be processed into the application. After that, the files appear in the file list in the top left of the Text Converter. Alternatively, you can also open each file individually or you can open a complete directory. To do that, click on "Open Folder" in the files area in the top left.

Second step: Actions

On the right side of the program you can select some "Actions". Simply check the actions you want. The actions are applied on all files currently in the file list. A preview of the files can be found in the bottom left, so that you can verify whether the files are changed like you want.

We would like to select the action "Replace Text". In the boxes "Search for" and "Replace by", you can enter arbitrary tests (also multiple line texts) and if you want you can use also regular expressions. In the preview, you should see now, how the text file changes. You can click on each file in the file list to show their preview.

If you want to apply several replacements at the same time. click on "Add". If you then click on "Show Settings for multiple Replacements", a list of all replacements will be shown. These replacements will be carried out in the order of the list and are also visible in the preview.

search|replace

this part will be|replaced with this part.

If you do not want to add all replacements in this way, simply click on "Manager". Here you can add a great number of replacements at the same time. In the grey box, there is a example how this list can look like. The search string and the replace string are separated with a delimiter, in the example we are using the delimiter |, but you can also use any other character or string. After that, click on "To the Actions" in the manager and all of your replacements will be added to the main program and can be used there.

Third step: Saving

If you are satisfied with the preview, you can save all of the files. You can do that in the bottom right of the main window. Here it is possible to choose whether the files should be overwritten (the original files will be lost) or whether you want to save the files as new files in a new folder or under a new name. If you enter %name%-1 as the name, the string -1 will be attached to the old file name. The same applies to the directory. If you enter %folder%\new as the directory, a new folder with the name "new" will be created in the old folder. A preview of the file name and the folder is displayed under the text preview of the new file.

If all settings are done and the preview is satisfactorily, simply click on "Convert and Save" to store all of the files.

 
  
 

Comments

Have you got the same opinion like the author or do you want to add something? Here you can leave a comment.

Write a comment

You can leave an anonymous comment. If you want to write something under your name, please log in or register.



Past Comments

Nobody has written a comment on this article. You can be the first one.