I'd scale back to pinpoint the error.
Put a test file on G:\ and try deleting that single file.
Then I'd try the same thing using the extension.
Once you're 100% sure your syntaxe is right you can move on :
I'd then move down to the first dir where there's $ sign and try a delete there.
That $ sign might need to be escaped somehow.
Let me know how that goes for you.