Problem with spaces in output file path in command line

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: helmut, XnTriq, xnview

Post Reply
wkone
Posts: 17
Joined: Thu Mar 11, 2010 10:08 am

Problem with spaces in output file path in command line

Post 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
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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

Post 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!
Pierre.
wkone
Posts: 17
Joined: Thu Mar 11, 2010 10:08 am

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

Post 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"

:?
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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

Post 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
Pierre.
wkone
Posts: 17
Joined: Thu Mar 11, 2010 10:08 am

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

Post 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
wkone
Posts: 17
Joined: Thu Mar 11, 2010 10:08 am

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

Post 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
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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

Post by xnview »

[quote="wkone"
I would like to know if this bug has been fixed.
[/quote]
No not yet, sorry
Pierre.
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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

Post by xnview »

You can use "-capture=desktop,c:\temp\mon rep\file.jpg"
Pierre.
Post Reply