I would like to merge many bibtex files and sort the combined file by year. I used \bibliography to merge but when I want it to order by year, it ordered by input file. So, each input file is sorted separately. Here is my code
\documentclass{article}
\begin{document}
\nocite{*}
\bibliographystyle{plain}
\bibliography{file1,file2,file3}
\end{document}
Thank you so much.

plainsorts by name first). If I understand your question correctly the only thing you need to change is the selected style, so you can force the desired order. Off the top of my head I don't know a BibTeX style that sorts by year first (though I have no doubt that there are such styles available already). You can create your own style with https://www.ctan.org/pkg/custom-bib (https://tex.stackexchange.com/q/96174/35864). – moewe May 12 '22 at 15:11biblatexis incompatible with the classical BibTeX approach you are using at the moment as it completely reimplements LaTeX's citation and bibliography commands. It is easy enough to switch tobiblatex(https://tex.stackexchange.com/q/5091/35864), but some people prefer to stick to BibTeX for a variety of reasons. See also https://tex.stackexchange.com/q/25701/35864. It would help if you could either explicitly state that you are interested in abiblatexsolution (if that is the case) or remove the tag to avoid confusion. – moewe May 12 '22 at 15:16