Problems with spaces and hyphens in file paths
When running in a Linux environment from the command line, with both target and source file paths inside quotation marks, JHOVE2 has major problems with spaces in the path or file name.
If there is a space in the target pathname, the results will be written into a file with the name ending with the space is (e.g., -o "/tmp/my results.xml" will put the results in /tmp/my).
A space by itself in the source file pathname is OK, but if that space is followed by a hyphen, JHOVE2 will not process the file, interpreting that hyphen as a new command line argument, even though it's inside the quotes. So if the source file path is "c:\temp\MyFiles - Copy\stuff.txt" (the default name that Windows Explorer would assign after a copy-and-paste of a folder called MyFiles), JHOVE2 will error out with the following message: Unknown option - ' - '. It doesn't matter whether there is a space or a character after the hyphen; as long as the string space-hyphen appears, even, as I said, inside a fully quoted pathname string, JHOVE2 will fail and no results file is created.