From: "Jan E." Date: 2012-07-04T19:02:04+09:00 Subject: Re: Copying Files Alex C. wrote in post #1067362: > Thats what I have, and it now copies all the files, but hasn't ignored a > file thats in D:/Stuff/Ruby/2/ - which is what I wanted..hmmph Leave out the trailing slash in 'D:/Stuff/Ruby/', it will lead to a double slash in the file paths. I didn't see that first. Well, as you can see, the solution is far from perfect. What you could do is to at least "normalize" the paths by replacing multiple slashes and backslashes with a single slash: file_path.gsub(/[\/\\]+/, '/').start_with? ignore_folder.gsub(/[\/\\]+/, '/') -- Posted via http://www.ruby-forum.com/.