From: peteV Date: 2012-12-08T07:17:31+09:00 Subject: strange syntax error on rename Hi, I'm a total newb and wanted to get my hands dirty with a lil script I could use right now. I can get the Dir.foreach to print my directory of files separately in irb and the rename of one existing file with it's tag info also. combining the two seems harder to do. Can someone please help me and show me how to make this work together. ----------------------------------------------- #!/usr/bin/ruby require 'taglib' Dir.foreach("/home/music/") do |file| # Load a file TagLib::FileRef.open (file.to_s) do |fileref| tag = fileref.tag tag.title tag.artist File.rename ( "#{file}","#{tag.title}-#{tag.artist}.mp3") end # File is automatically closed at block end ------------------------------------------------------------------------------ here is the error dump ./taglibex.rb:15: syntax error, unexpected ',', expecting ')' File.rename ( "#{file}","tag.title-#{tag.artist}.mp3") ^ ./taglibex.rb:15: syntax error, unexpected ')', expecting keyword_end