When using a custom build command, the substitution variable $file_ext receives a surplus double quote at the end, which completely prevents custom build commands from working correctly.
Custom build command as follows:

Produces the following call:
echo myfile.myextension"
(note the unrequested trailing double quote).
Version is svn 10035 on Windows XP.
Other inconsistencies in quotes in custom build commands:
$file resolves to "fully_quoted_filename.extension" (quotes around full string)$file_dir looks like \\"C\mydirectory (double backslash and quote at the start)$file_name, $object etc are unquoted (as they should be) I would suggest this is a very high priority, as the entire custom build command functionality is not functional on windows with this bug. The bug does not appear to exist on linux or OS X.
Can you try any of the latest nightlies? r10035 is old...
I can reproduce. Its a Windows only issue.
I've attached a sample to reproduce and taking over.
This should have high priority.
Fixed in trunk. Thanks for reporting!