How to get it to work!

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

Post Reply
Jschaffer
Posts: 3
Joined: Mon Apr 29, 2013 9:19 pm

How to get it to work!

Post by Jschaffer »

I'm not unexperianced with command line.

I extract nconvert to c:\Program Files\XnView

When I try ncovert with the full path c:\Program Files\XnView\nconvert -help as an example, Its all just bad command or file name errors. try with quotes/no quotes, etc.

I am unimpressed with this software - the documentation is full of holes and very unclear in places.

Posting in the forum is my last attempt before I ditch it.
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: How to get it to work!

Post by XnTriq »

Jschaffer wrote:When I try ncovert with the full path c:\Program Files\XnView\nconvert -help as an example, Its all just bad command or file name errors. try with quotes/no quotes, etc.
This is a known issue.

Have you considered adding C:\Program Files\XnView\ (temporarily) to your system's environment variables?
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How to get it to work!

Post by cday »

Probably the least intimidating way to add a program to the Windows Path environment variable is with the excellent Redfern Path Editor. NConvert can then be called at the command prompt or in a batch file by simply entering nconvert. http://www.redfernplace.com/software-pr ... atheditor/

In general, quotes around paths with spaces do seem to work provided wildcards aren't used in the same path. As wildcards are useful and often essential for efficient batch processing, it is generally best to plan to use paths without spaces. When images to be batch processed are in a folder with spaces in the path, they can easily be copied to a folder with no spaces in the path.

Edit: It seems to be possible to use quotes with wildcards in the specific case where there are spaces in the input *file names* provided there are no spaces in the input *file path*, if that makes sense. For example: "C:\aaa\bbb\*.jpg" in a script seems to work for an input file C:\aaa\bbb\c d eee.jpg despite the spaces in the file name. The practical significance of that if confirmed is that files with spaces in the *file names* can be processed successfully by copying them to a folder with no spaces in the *file path*.

Yes, the documentation could be better, and using command line software requires patience and some persistence, but it is free software and it can actually be quite useful!

Note: NConvert topics should really be posted in the NConvert section of the forum.
Jschaffer
Posts: 3
Joined: Mon Apr 29, 2013 9:19 pm

Re: How to get it to work!

Post by Jschaffer »

I was able to get Xnconvert.exe to launch via command line after setting the env. variable, but it still fails if I use nconvert as the command - not recognized.
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: How to get it to work!

Post by XnTriq »

Jschaffer wrote:I was able to get Xnconvert.exe to launch via command line after setting the env. variable, but it still fails if I use nconvert as the command - not recognized.
Please note that nConvert and XnConvert are two different programs, which work independently of one another.
Jschaffer
Posts: 3
Joined: Mon Apr 29, 2013 9:19 pm

Re: How to get it to work!

Post by Jschaffer »

I realize they are two different programs.

When I use an env. path tot the XnView program, it doesn't find the ncovert.
cday
XnThusiast
Posts: 3976
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How to get it to work!

Post by cday »

You want to run the command line utility nconvert which is in your C:\Program Files\Xnview folder?

I have that folder in my Path environment variable and C:\nconvert -help doesn't work for me either! But C:\notepad does open the Notepad application... Maybe someone more experienced can explain that? ---- Edit 03.05.2013: It is working today ??

You could run nconvert by placing nconvert.exe in your Windows folder, although that is hardly good practice and might have risks.

Your original query concerned running nconvert from the command line using the full path: I can confirm that works for me with both the space in 'Program Files' and the quotes:

C:\>"C:\Program Files (x86)\XnView\nconvert.exe"

Note: In Windows 7 32-bit programs are placed in the 'Program Files (x86)' folder.

Edit:

When I have used nconvert it has normally been in a Windows batch file .bat which enables multiple actions to be repeated without having to the enter text at the command prompt. The Path problem can then be easily avoided by placing a copy of nconvert.exe in the same folder as the .bat script.
Post Reply