Batch file to merge 2 text files?

Soldato
Joined
15 Aug 2011
Posts
4,957
Hey guys


Quick and should be an easy question hopefully.

Two text files, both with the same text format in them!

If I do this,

Copy text1.txt+text2.txt text3.txt then that should merge them together..

Obviously have the paths for the text files in place.

Now what I would want to do is, then delete the original files and copy the newly made file back over to the original file paths.

Is it also possible to check for double entries against each file?

Basically it is for two ban files for two different servers on the same box.

Thanks

Will be using firedaemon to run the batch once or twice a a day.
 
Hey mate

Thanks for replying, and sorry for taking so long to get back to you!

The second powershell example looks great, unfortunately I couldn't get it to work!

Left with a 1Kb txt file empty after using it!

Any ideas?

Thanks Again
 
Back
Top Bottom