candera / hobocopy

An open source backup tool for Windows
http://candera.github.com/hobocopy/
MIT License
176 stars 52 forks source link

Filenames in quotes don't work? #13

Closed isenseep closed 13 years ago

isenseep commented 13 years ago

In W7 x64 using the Vista x64 .exe when I issue: C:\Hobocopy>hobocopy /full /verbosity=3 /skipdenied /y /simulate "D:\Outlook\Phil\" "D:\Phil\My Documents\Outlook Backup\" I get: Starting a full copy from D:\Outlook\Phil" D:\Phil\My to C:\Hobocopy\Documents\O utlook

Not exactly promising!

(I have found workarounds to convert to 8.3 names but I noted this issue cropped up a long time ago in the old blog.)

candera commented 13 years ago

Yep. This is a known bug, and is high on my list to fix. Now that I actually have some time to devote to this, I hope to get this fixed fairly soon. Thanks for the bug report!

candera commented 13 years ago

OK, I looked into this. This is actually a problem with cmd.exe, not with hobocopy. The issue is that you're ending your directories with backslashes, which escapes the following double quote. So when you say:

hobocopy /full /verbosity=3 /skipdenied /y /simulate "D:\Outlook\Phil\" "D:\Phil\My Documents\Outlook Backup\"

cmd.exe sends that to hobocopy as the following list of arguments:

/full
/verbosity=3
/skipdenied
/y
/simulate
D:\Outlook\Phil" D:\Phil\My
Documents\Outlook
Backup"

Instead, try invoking it as follows:

hobocopy /full /verbosity=3 /skipdenied /y /simulate "D:\Outlook\Phil" "D:\Phil\My Documents\Outlook Backup"

That should work.

This is, of course, super annoying, but I don't think there's anything I can do about it. Looks like a problem with the shell. I'm going to go ahead and close this bug. Feel free to reopen it if you feel the issue is not resolved.

candera commented 13 years ago

As an interesting aside, it looks like pathnames with spaces in them work just fine now. Not sure how that happened.