'Bat file to to run a group of text files in sequence
I am new here and I am having a bit of trouble obtaining my desired output.
I have a locked down system with no Powershell etc and I need to manipulate some txt files in a certain order. I have looked at doing this with excel VBA, however the time it takes to output renders this unrealistic.
I am looking to create a BAT file to complete the object via CMD.
I need it to (in this order):-
- Change the filenames to "FILE" & 1, then 2 then 3 etc.
- Replace all spaces with commas in the content of the text files.
- Remove all underscores from the content of the text files.
- Remove all Alpha text characters (A-Z) from the content of the text files.
- Remove any blank lines from the text files.
- Merge all text files with the filenames on EACH line of the text to for example 'output.tmp'.
I have had some luck achieving this with separate bat files however I am having trouble with points 1,3 and 4.
I would also like to at some stage be able to remove any numbers which are not between two separate values eg 1 and 3 and 6 and 9.
Any help is appreciated.
Thank you
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
