From: Arup Rakshit Date: 2013-01-30T21:43:31+09:00 Subject: Re: (Errno::EINVAL) occurs during the File::rename() execution 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\/\\:\*\?\"<>\|]/, '_') But still the error: ------- H76954 ------- C:/Documents and Settings/rakshiar/My Documents/userdata/Downloaded Files/H76954 /Specjalistyczny Gabinet Kardiologiczny Dr hab. med. Ewa Straburzy?ska-Migaj.pdf C:/Documents and Settings/rakshiar/My Documents/userdata/Downloaded Files/H76954 /H76954Specjalistyczny Gabinet Kardiologiczny Dr hab. med. Ewa Straburzy_ska-Mig aj.pdf C:/Documents and Settings/rakshiar/My Documents/userdata/Ruby/Scripts/FileNamere naming.rb:21:in `rename': No such file or directory - (C:/Documents and Settings /rakshiar/My Documents/userdata/Downloaded Files/H76954/Specjalistyczny Gabinet Kardiologiczny Dr hab. med. Ewa Straburzy?ska-Migaj.pdf, C:/Documents and Settin gs/rakshiar/My Documents/userdata/Downloaded Files/H76954/H76954Specjalistyczny Gabinet Kardiologiczny Dr hab. med. Ewa Straburzy_ska-Migaj.pdf) (Errno::ENOENT) from C:/Documents and Settings/rakshiar/My Documents/userdata/Ruby/Scrip ts/FileNamerenaming.rb:21:in `block (2 levels) in
' from C:/Documents and Settings/rakshiar/My Documents/userdata/Ruby/Scrip ts/FileNamerenaming.rb:9:in `each' from C:/Documents and Settings/rakshiar/My Documents/userdata/Ruby/Scrip ts/FileNamerenaming.rb:9:in `block in
' from C:/Documents and Settings/rakshiar/My Documents/userdata/Ruby/Scrip ts/FileNamerenaming.rb:5:in `each' from C:/Documents and Settings/rakshiar/My Documents/userdata/Ruby/Scrip ts/FileNamerenaming.rb:5:in `
' C:\Documents and Settings\rakshiar\My Documents\userdata\Ruby\Scripts> -- Posted via http://www.ruby-forum.com/.