To the west of Rochester, the Tonawanda Railroad was chartered April 24, 1832 to build from Rochester to Attica. The first section, from Rochester southwest to Batavia, opened May 5, 1837, and the rest of the line to Attica opened on January 8, 1843. The Attica and Buffalo Railroad was chartered in 1836 and opened on November 24, 1842, running from Buffalo east to Attica. When the Auburn and Rochester Railroad opened in 1841, there was no connection at Rochester to the Tonawanda Railroad, but with that exception there was now an all-rail line between Buffalo and Albany. On March 19, 1844 the Tonawanda Railroad was authorized to build the connection, and it opened later that year. The Albany and Schenectady Railroad bought all the baggage, mail and emigrant cars of the other railroads between Albany and Buffalo on February 17, 1848 and began operating through cars.