I want to do a recovery of files with commas in their names from the command line, ala:
wbadmin start recovery -version:10/01/2013-12:00 -itemType:File -overwite:Overwrite -quiet "-Items:C:\Path\To\File, With Comma.txt,C:\Path\To\File 2, With Comma.txt"
So there are two files:
- C:\Path\To\File, With Comma.txt
- C:\Path\To\File 2, With Comma.txt
The problem is wbadmin assumes commas separates each file, so it sees 4 files specified instead of 2. I've tried putting a \
in front of commas that are part of the file names like so:
wbadmin start recovery -version:10/01/2013-12:00 -itemType:File -overwite:Overwrite -quiet "-Items:C:\Path\To\File\, With Comma.txt,C:\Path\To\File 2\, With Comma.txt"
but it doesn't work, it just says there's a syntax error. The documentation on Technet doesn't seem to mention anything that'll help either.
OS is Windows Server 2008 R2.
A clarifying comment: I've changed the file names to be different than the actual names to be less revealing, but I also see I dumbed it down too much. The comma can occur either in the file name itself like C:\Path\To\File, With Comma.txt
or in the path to the file, like: C:\Path, To\Other\File.txt
.
C:\Path\To\File, With Comma.txt
to"C:\Path\To\File, With Comma.txt"
? Normally in command line syntax you can use double quotes to prevent the command from assuming it is the next parameter."-Items:..."
command like that because of the spaces in the name. Changing it to-Items:"C:\Path\To\File, With Comma.txt","C:\Path\To\File 2, With Comma.txt"
doesn't work either. If I specify one file, the error says the files aren't in the same directory. If I specify both files, it just says syntax error.C:\Path\To\"File, With Comma.txt"
? Is it the same files each time for you? I ask because I would think you could use the 8.3 shortname instead.C:\Path\To\"File, With Comma.txt"
shows up in the program asC:\Path\To\"File, With Comma.txt
as if the quote was in the name because of escaped characters in the command prompt. To do what you're saying, it's reallyC:\Path\To\\"File.txt"
but that still bombs out saying they need to be in the same directory.