From: "marcin k." Date: 2011-11-06T04:20:41+09:00 Subject: need spome help please :) Hello :) SO here is my problem. I have this code and need it to work but i cant do it by myself and now need to ask you if you can help. # Changing the file name def file_rename(path) case path when $file_pos_path then $file_name.value = "zdjęcie stanowiska POS w PSD" and file_ext = $file_pos_ext and old_file = $file_pos_path when $file_kableprzed_path then $file_name.value = "stan okablowania POS w PSD" and file_ext = $file_kableprzed_ext and old_file = $file_kableprzed_path when $file_kablepo_path then $file_name.value = "zdjęcie stanowiska POS w PSD" and file_ext = $file_kablepo_ext and old_file = $file_kablepo_path when $file_posprzed_path then $file_name.value = "stan POS w PSD" and file_ext = $file_posprzed_ext and old_file = $file_posprzed_path end if path != nil or "#{path}".length != 0 then File.rename("#{old_file}", "Ruch, #{$file_name} #{$psd}, #{$miejscowosc}#{file_ext}") I would like for this script to only change name of first one like that but for those last three so it will change it like this: File.rename("#{old_file}", "Ruch, #{$file_name} #{$psd} przed migracją, #{$miejscowosc}#{file_ext}") Any chance for someone to write it for me in proper way? Thanks in advance -- Posted via http://www.ruby-forum.com/.