The development of a new nanolithographic strategy, named scanning nanowelding lithography (SNWL), for the one-step fabrication of arbitrary high-aspect-ratio nanostructures of metal is reported in this study. Different from conventional pattern transfer and additive printing strategies which require subtraction or addition of materials, SNWL makes use of a sharp scanning tip to reshape metal thin films or existing nanostructures into desirable high-aspect-ratio patterns, through a cold-welding effect of metal at the nanoscale. As a consequence, SNWL can easily fabricate, in one step and at ambient conditions, sub-50 nm metal nanowalls with remarkable aspect ratio >5, which are found to be strong waveguide of light. More importantly, SNWL outweighs the existing strategies in terms of the unique ability to erase the as-made nanostructures and rewrite them into other shapes and orientations on-demand. Taking advantages of the serial and rewriting capabilities of SNWL, the smart information storage-erasure of Morse codes is demonstrated. SNWL is a promising method to construct arbitrary high-aspect-ratio nanostructure arrays that are highly desirable for biological, medical, optical, electronic, and information applications.