I think the $connecteddrives will just substitute in the text - and the quotes in it will then not be escaped. When you put that value together try using \\\" instead of \" . That way you will end up with \" in connecteddrives instead of " and the backslash should escape it the second time the shell interprets it. Mike