From: 12 34 Date: 2007-07-10T11:54:29+09:00 Subject: Simple string operation seqNo = File.basename("/Volumes/MINOLTA1/DCIM/100MLT16/PICT0004.MOV",".*")[-1,3].to_s seqNo = "-" + seqNo+ ".xx.m" puts "seqNo: #{seqNo} " # >> seqNo: -4.xx.m but I want it to be -004.xx.m. In other words I want the leading zeros. I didn't even think the .to_s should be necessary, but tried it in desperation. Thanks Newbie (but you already figured that out by the question). -- Posted via http://www.ruby-forum.com/.