candera/shadowspawn

error 2 always if command ARGUMENTS use quotes (to deal with spaces)

githubuser181226 opened this issue · 1 comments

Hi. I want to use FastCopy as a command, but ShadowSpawn always fails with error 2, unless I remove all doublequotes from the command and its arguments
example:

ShadowSpawn D:\ B: "C:\Program Files\FastCopy\FastCopy.exe" /cmd=sync /exclude="$RECYCLE.BIN;System Volume Information;RECYCLE?;*\thumbs.db" /auto_close /open_window B:\ /to="\backups\D"

This always ends with error 2, while this works:
cd /d "C:\Program Files\FastCopy"
ShadowSpawn D:\ B: "C:\Program Files\FastCopy\FastCopy.exe" /cmd=sync /exclude=$RECYCLE.BIN;RECYCLE?;*\thumbs.db /auto_close /open_window B:\ /to=\backups\D

But as you can see I had to remove all quotes and values containing spaces, which is suboptimal.
Any advice?
Regards.

Fixed by moving quote outside the argument, ie. "/exclude=path with spaces" instead of /exclude="path with spaces".