Recently working on a pipeline, I wanted to restore multiple transaction log backups on a MS SQL server. The files were located under R:\files\incremental.
You can use below powershell in order to do the restore automatically.
The above powershell will try to restore the X transaction log in the database. If the one is already restored, it will skip, else the log will be restored.