in reply to How to prefix a string to all the files in a directories as well subdirectories

Your inner foreach loop needs attention. You are altering the filename to the new filename, but not saving it for the rename. Using "$one" as a variable name it not very descriptive either. I suggest:
foreach $file (@files) { rename $file,"reference_$file" }
(Untested)
  • Comment on Re: How to prefix a string to all the files in a directories as well subdirectories
  • Download Code