in reply to Re: search all folder except certain folders
in thread search all folder except certain folders
--thanksfinddepth (\&rename_file_dir , "c:\\" ); sub rename_file_dir { if( /(.*)csscs_ref(.*)/i )# any files or directories { $orig = $File::Find::name ; $concat = $File::Find::dir . "\/$1$new_hostname$2"; rename($orig, $concat) || print "error can't rename $orig to + $concat: $!" } } How can I rewrite the subroutine so that the script looks for all file + that has the substring "csscs_ref" but not in the 'c:\\WINNT' folder +.
|
|---|