def rename(pattern)
      from, to = pattern.sub(/^\//, '').sub(/\/$/, '').split '/'
      if to.nil?
        from, to = current_item.name, from
      else
        from = Regexp.new from
      end
      unless in_zip?
        selected_items.each do |item|
          name = item.name.gsub from, to
          FileUtils.mv item, current_dir.join(name) if item.name != name
        end
      else
        Zip::File.open(current_zip) do |zip|
          selected_items.each do |item|
            name = item.name.gsub from, to
            zip.rename item.name, name
          end
        end
      end
      ls
    end
def rename(pattern)
      from, to = pattern.sub(/^\//, '').sub(/\/$/, '').split '/'
      if to.nil?
        from, to = current_item.name, from
      else
        from = Regexp.new from
      end
      unless in_zip?
        selected_items.each do |item|
          name = item.name.gsub from, to
          FileUtils.mv item, current_dir.join(name) if item.name != name
        end
      else
        Zip::File.open(current_zip) do |zip|
          selected_items.each do |item|
            name = item.name.gsub from, to
            zip.rename item.name, name
          end
        end
      end
      ls
    end
Rename selected files and directories.

 ==== Parameters
 * +pattern+ - new filename, or a shash separated Regexp like string