From: Arup Rakshit Date: 2013-01-30T22:30:48+09:00 Subject: Re: (Errno::EINVAL) occurs during the File::rename() execution Arup Rakshit wrote in post #1094339: > Joel Pearson wrote in post #1094338: >> If there's a length limit, try renaming using only the basename and then >> move the file seperately. > > > I tried the below as you linked me: > > file_new_name.gsub!(/[\x00\/\\:\*\?\"<>\|]/, '_') > > After doing a bit research I found that there is a file called "Specjalistyczny Gabinet Kardiologiczny Dr hab. med. Ewa Straburzyńska-Migaj.pdf" in the directory - "H76954". Now when the script reading,one character - `ń` in the file name converting it to the `?`. Thus getting the error. Anyway to avoid the such character encoding problem? -- Posted via http://www.ruby-forum.com/.