 McClellan 's army cautiously inched towards Richmond over the next three weeks , coming to within four miles ( 6 km ) of it . He established a supply base on the Pamunkey River ( a navigable tributary of the York River ) at White House Landing where the Richmond and York River Railroad extending to Richmond crossed , and commandeered the railroad , transporting steam locomotives and rolling stock to the site by barge . 
