C:\elmPaul\jod25573786-2k2 C:\elmPaul\jod25573786-2k2\wed25573786-2k2 #### finddepth (\&update_file , "C:\\elmPaul" ); sub update_file { if( /(.*)$old_hostname(.*)/i ) { $concat = "$1$new_hostname$2"; rename($_, $concat) || print "error can't renames:$!"; } #### sub update_file { if( /(.*?)$old_hostname(.*?)/i ) { $concat = "$1$new_hostname$2"; rename($_, $concat) || print "error can't renames:$!"; }