I am trying to copy files from one folder to another.
The code is quite simple:
frompath = File.join(fromdirectory,filename) topath = File.join(todirectory,filename) FileUtils.cp(frompath, topath)
The code actually works and indeed copies the images.
The problem is that right after copying them, the REXML throws the
#<RuntimeError: Illegal character ‘&’ in raw string
"ï¿½ï¿½ï¿½ï¿½ JFIF ï¿½ï¿½;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality =
! “$” $ ï¿½ï¿½C
\ " ï¿½ï¿½
ï¿½ï¿½ï¿½ } !1A Qa "q 2ï¿½ï¿½ï¿½ #Bï¿½ï¿½ Rï¿½ï¿½$3brï¿½
So., what does REXML have to do with the code?
The actual filename comes from a parsed element. The code previous to
the copy does something like t his.
doc = REXML::Document.new(screencontent)
if c.name == ‘File’
images << c.attributes[‘source’]
After that, I loop through the images array to get and copy all of the
I must insist that before throwing the exception, the files are
Thanks so much for your help in advance.