Forum archive
Bug Found??? I think so....
- Hi Ken,
I think I have found a bug with the PNGOUT.exe for Windows...
I am using it to compress files from .NET using System.Diagnostics.Process which calls an external process... Below is the path of the PNG when its trying to be called...
"I:\CellCast\Client\bin\Copy of Debug\\content\1\CMS_CATEGORY_ID_DATA_FILES\117\pngout.exe /c3 /y file.png"
The error occurs if I have a space in the Path such as in the above...
The Error is "Error - Too many filenames specified on cmdline"
If I try the exact same code without a space in the path its fine...
I have tried
"I:\CellCast\Client\bin\Copy of Debug\\content\1\CMS_CATEGORY_ID_DATA_FILES\117\pngout.exe /c3 /y /ifile.png"
And still no luck....
If you get a chance to fix it... for example by ignoring whats parsed before the actual executable name
Regards
Mark - It looks like your program is passing the following to pngout:
argc = 6
argv[0]: "I:\CellCast\Client\bin\Copy"
argv[1]: "of"
argv[2]: "Debug\\content\1\CMS_CATEGORY_ID_DATA_FILES\117\pngout.exe"
argv[3]: "/c3"
argv[4]: "/y"
argv[5]: "file.png"
This "bug" is not specific to PNGOUT. Any command line program would fail with input like that. PNGOUT (as well as just about any command line program ever designed) expects argv[1] to be the first parameter after the executable name. To fix it, you must somehow put quotes around the filename like this:
"I:\ ... \pngout.exe"
If your process doesn't support generation of quotes inside quotes, then you'll have to simplify your path somehow.