The demand of medical materials for rapid and efficient elimination of bacteria has seen a dramatic surge over the past few years. In this study, antibacterial nanofilms with reactive oxygen species were generated by photocatalysis. To prepare these nanofilms, Ag and amorphous TiO 2 nanoparticles decorated on polydopamine (PDA) were coated on three-dimensional (3D) nanopore arrays, which was fabricated on a substrate of anodized stainless steel. All the antibacterial tests were conducted with a household flashlight, which may be considered as a practical approach for antibacterial materials. The photoelectrochemical property of the 3D Ag/TiO 2 /PDA nanofilm on 316L stainless steel (Ag/TiO 2 /PDA SS) was about 15 times higher than that of the annealed Ag/ TiO 2 /PDA SS, and consequently, it exhibited higher antibacterial activity. The enhanced photoelectrochemical property is attributed to the successful separation of electrons (amorphous TiO 2 ) and holes (Ag nanoparticles). Further, when a plate containing 3D Ag/TiO 2 /PDA SS was irradiated with visible light just for 10 min, it immediately destroyed the bacteria in 10 6 CFU/mL without any bacterial colony. After five weeks, there were still no bacterial colonies in the plate corresponding to Ag/TiO 2 /PDA SS under visible light, while Ag/TiO 2 / PDA SS in dark had a negligible effect on the bacteria, i.e., the antibacterial mechanism through direct contact and ion dissolution was not efficient. The excellent antibacterial properties of 3D Ag/TiO 2 /PDA SS illuminated by flashlight provides an efficient, facile, and cost-effective technique for the development of antibacterial medical materials to meet the increasing demand of eliminating bacterial infections.