in reply to Reg Ex : an odd error...

You could look into the use of \Q and \E to avoid interpretation of the special characters in the regexp. That way there'd also be no need to have the double backslashes in the directories.

Jasper