You either need to use single quotes for the line that defines 'c:\extrafiles', or use "c:\\extrafiles"
quotemeta does what you think it does, but not until *after* the quoted string has been evaluated.
I also don't think you're going to want to quotemeta those directory names. Windows will not be very happy getting a drive reference like 'c\:\\somedir'. Windows wants to see only a real path.
For the record, Windows doesn't care about the direction of the slashes in internal functions. The only thing that cares are the user interface programs. DOS/Windows has supported '/' as a path separator since 5.0 or so, as I recall. So, you should be able to save your self a lot of trouble with this, as long as you aren't invoking the shell to process any of your arguments.
--Chris
e-mail jcwren