Page 1 of 1

Problem with spaces in output file path in command line

Posted: Thu Mar 11, 2010 11:28 am
by wkone
Hello,


I try to make a command line to get a screen picture and to create a jpg out of it. The forum topics helped me a lot and I have this command:

Code: Select all

"C:\Program Files\XnView\xnview.exe" -capture=desktop,c:\temp\monrep\file.jpg
With no spaces in the output file path, everything is ok: a file named file.jpg in created in "c:\temp\monrep\"

Now if the output directory contains a space character, this is what appends:

Code: Select all

"C:\Program Files\XnView\xnview.exe" -capture=desktop,c:\temp\mon rep\file.jpg
The created file is: "c:\temp\mon.jpg"

Code: Select all

"C:\Program Files\XnView\xnview.exe" -capture=desktop,"c:\temp\mon rep\file.jpg"
The created file is: "c:\temp\mo.jpg"

Very likely there is something strange in the interpretation of the output path...
Version of XnView: 1.97.2

Did I do something wrong or is there really something strange in the way the output path has been interpreted?

Any help (or fix ;) ) would be greatly appreciated,


Best regards

Re: Problem with spaces in output file path in command line

Posted: Thu Mar 11, 2010 3:06 pm
by xnview
wkone wrote:

Code: Select all

"C:\Program Files\XnView\xnview.exe" -capture=desktop,"c:\temp\mon rep\file.jpg"
The created file is: "c:\temp\mo.jpg"
This one must work!

Re: Problem with spaces in output file path in command line

Posted: Thu Mar 11, 2010 4:38 pm
by wkone
Yes, it should... But I tried once again to be sure and it does not. I really get a file called "mo.jpg"

:?

Re: Problem with spaces in output file path in command line

Posted: Thu Mar 11, 2010 4:47 pm
by xnview
wkone wrote:Yes, it should... But I tried once again to be sure and it does not. I really get a file called "mo.jpg"

:?
So a bug

Re: Problem with spaces in output file path in command line

Posted: Thu Mar 11, 2010 5:37 pm
by wkone
It seems so...

By the way, as my final goal was to grab the content of the clipboard when I encounter this issue, maybe you have a clue for this:

- How to create a file with the clipboard content in command (http://newsgroup.xnview.com/viewtopic.php?f=35&t=19546)

Thanks a lot

Re: Problem with spaces in output file path in command line

Posted: Tue May 18, 2010 2:41 pm
by wkone
xnview wrote:
wkone wrote:Yes, it should... But I tried once again to be sure and it does not. I really get a file called "mo.jpg"

:?
So a bug
Hi Pierre,

I would like to know if this bug has been fixed.
How can I see a complete list of the changes for all the latest versions of XnView?

Thx a lot,

Regards,

Wkone

Re: Problem with spaces in output file path in command line

Posted: Thu May 20, 2010 1:11 pm
by xnview
[quote="wkone"
I would like to know if this bug has been fixed.
[/quote]
No not yet, sorry

Re: Problem with spaces in output file path in command line

Posted: Fri Jun 04, 2010 12:30 pm
by xnview
You can use "-capture=desktop,c:\temp\mon rep\file.jpg"