From: SpringFlowers AutumnMoon Date: 2008-08-27T15:05:16+09:00 Subject: Re: Moving all files in a folder to another hard drive Axel Etzold wrote: > require "cgi" > > files.each { |file| > p CGI.escape(file) > # and then move files > } > > That's not elegant, but it will produce names with only % and ASCII > letters. > > > How does rio behave under Windows (http://rio.rubyforge.org/) ? thanks for helping. the cgi actually prints out %3F which is the ASCII for "?" since maybe the byte printed by each byte is 69, so encoding with CGI method will give %3F I tried Rio. It actually bypass all files with international characters in it. So for example, if my directory has 10 files, and 3 of them with the filename containing international characters in them, then rio(basedir).files['*.*'] actually just return 7 files. -- Posted via http://www.ruby-forum.com/.