TxtChanger manual (v. 2.0)
System requirements and installation
Win 10 64-bit. Freeware.
Download txtchanger20setup.zip (1.2MB) and extract txtchanger20setup.exe. Run the file and follow the prompts.
Please check Disclaimer and legal notices → Digital environments.
Errors
Walkthrough - an example
Contact and bug report
Version 2.0 has a more efficient layout and workflow, making the entire operation faster and more secure.
Why this program
Deleting and inserting text is not exactly ground-breaking. But there is one situation where something like TxtChanger is needed: a substitute for the html copy command. It has been implemented in later HTML versions, but not all browsers can make use of it (yet). And in any case, all html pages would have to be ramped up to the new version.
TxtChanger v. 2.0 sets up a new folder TCnew for the modified files within the source folder(s) of the original files. The name TCnew can be changed by the user which also includes the folder's location.
So in effect one file is treated as a template (rather like style sheets) and then used to edit the others. While there are many text editing programs out there, I just wanted to make sure the process respects the html formatting and submitting it to the W3C validator page returns a green tick. The Otoom website modifications dated 9 Jul 22 (What's new, deleting three buttons at their original locations and inserting them again with another button added) meant 78 pages edited twice within seconds.
TxtChanger's startup window:
Every GUI comes with a tool tip, making the operation very easy.
Any text file can be used. The actual file extension doesn't matter as long as it's a text file.
The following errors could be encountered:
• The file is not a proper text file to begin with (file extensions are irrelevant);
• a file dragged into the 2 File(s) to be processed field is not a proper file (eg, a folder name);
• the text used to identify the deletion and/or the starting point of an insertion could not be found.
In all of the above cases TxtChanger will come up with the appropriate warning message which can be acted upon.
Should one or more files not have the required texts, a list of their names is displayed at the end of the batch process and can be saved to a text file. It is then up to the user to correct the error using this list.
The error messages are as follows:
In order of appearance they indicate - (1) a file in the batch list is not a proper text file, (2) a file in the batch list has been identified as not really a file, (3) during the batch process one of the files did not contain the text looked for, (4) the summary at the end of the batch process when errors had occurred.
If there are more than 5 files identified in the messages (1), (2) or (4) only the first 5 file names will appear in the respective message window followed by "+ [number] more". Saving will however write all the file names to a text file chosen by the user.
Choose one file out of the set to be processed and edit and test it until the desired result is obtained (from now on called the 'template'). Upload the file to the W3C validator page to get the green tick of approval.
It is recommended to copy the rest of files to be processed to a separate folder from which they are dragged into the 2 File(s) to be processed field.
Following sections 1, 2 and 3 -
Deletion:
1.
Click 1 Deletion, click 1 Use same file name(s), do not check 1 No file overwrite warnings, do not check 1 Select a different folder for the results (more options below).
2.
Drag n drop the files from your prepared folder into the 2 File(s) to be processed field.
3.
Using one of the files in the 2 File(s) to be processed field move the cursor across the text to be deleted and copy and paste it into the 3 Text to be deleted field.
4.
Click Start. The newly modified files can be found in the TCnew sub-folder(s). Validate them via the W3C validator page just to make sure they are technically correct.
5.
Copy the files from TCnew to the original html folder to overwrite the ones there. Done!
Insertion:
1.
Click 1 Insertion, click 1 Use same file name(s), do not check 1 No file overwrite warnings, do not check 1 Select a different folder for the results (more options below).
2.
Drag n drop the files from your prepared folder into the 2 File(s) to be processed field.
3.
Using the template move the cursor across the text to be inserted and copy and paste it into the 3 Text to be inserted field (it will have changed from 3 Text to be deleted).
4.
Using one of the files in the 2 File(s) to be processed field move the cursor across the text to be used as the start point of the insertion and copy and paste it into the 3 Text identifying start point of operation field.
5.
Click Start. The newly modified files can be found in the TCnew sub-folder(s). Validate them via the W3C validator page just to make sure they are technically correct.
6.
Copy the files from TCnew to the original html folder to overwrite the ones there. Done!
If for some reason one or more of the files to be processed do not contain the exact text that was selected for deletion and/or insertion, an error message will come up during the batch process and those files will be displayed in the final result message window. See Errors for more details.
Note: The files dragged into the 2 File(s) to be processed field are only used to affect the changes, but they themselves will not be changed. Therefore the same operation can be done several times and only the files in the TCnew folder(s) will have been modified (see Other Options below).
Note: TxtChanger makes use of all the characters found in a file, even those that may not be useful and/or visible to the human reader. But it's those other characters which do matter to browsers and therefore to html editors. Therefore care has to be taken to copy a text completely (including tabs and white spaces for example) otherwise the result may not work. The W3C validator has the last word!
Other options
1 Make a copy
If clicked the new files will have _copy added to their respective file names. Useful for testing purposes. The location(s) of the new files will be the same.
1 No file overwrite warnings
If checked the user will no longer be warned every time a new file overwrites an already existing file in a TCnew sub-folder (for example, when the same operation is performed more than once). Click Don't show this
warning again to prevent the warning message from appearing every time this option is selected. Click the ← Reset button to change back to the default settings.
1 Select a different folder for the results
If checked a folder different from the default TCnew can be used to store the newly modified files. Note however that all the new files will be written to that selection, irrespective of their particular source
folder. For example, as a default modified files coming from mystandbyhtml will be written to mystandbyhtml\TCnew, and files coming from myotherstandbyhtml will be written
to myotherstandbyhtml\TCnew. Now, all new files will be written to, say, mynewfolder. Click Don't show this warning again to prevent the warning message from appearing
every time this option is selected. Click the ← Reset button to change back to the default settings.
© Martin Wurzinger - see Terms of Use