Zach Dennis wrote: > key = "file" > attrib = "\\Applications\\4Dapp\\Chess\\" > command = "xcopy [file] /y /s /e i:\\source\\" > command.gsub!( /\[#{key}\]/ , "#{attrib}" ) > puts command > => "xcopy \\ApplicationsDapp\\Chess\\ /y /s /e i:\\source\\" > > > > It should be: > > => "xcopy \\Applications\\4Dapp\\Chess\\ /y /s /e i:\\source\\" > > > Any idea why it keeps stealing my \4? It recognizes \4 as meaning the fourth submatch of the last regex, or something to that effect. Double escaping or something should fix it. Hal