Aggregation of metal nanoparticles plays an important role in surface enhanced Raman scattering (SERS). Here, a strategy of dynamically aggregating/releasing gold nanoparticles is demonstrated using a gold-nanofilm-coated nanofiber, with the assistan