runing program and command from "RUN"

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

Moderators: helmut, XnTriq, xnview

Post Reply
jesperfj

runing program and command from "RUN"

Post by jesperfj »

I'm trying run Nconvert with VBA and automate a series of commands.

Can I run something like this at once?

"C:\Program Files\XnView\nconvert\nconvert.exe" -out jpeg -resize 200 -ratio -sharpen 12 -scaling -rflag orient -rtype lanczos "C:\Program Files\XnView\nconvert\1.tif" "C:\Program Files\XnView\nconvert\2.tif"

or do I have to use run > cmd.exe > open Nconvert.exe and then type the command?
jesperfj
Posts: 3
Joined: Sat Oct 04, 2008 1:49 pm

Post by jesperfj »

I've created a bat-file using XnView with this content:

C:\Program Files\XnView\nconvert\nconvert -npcd 2 -size 256x256+0 -ctype grey -corder inter -out jpeg -o C:\\%%.jpg -ratio -rtype lanczos -rflag orient -resize 200 0 -sharpen 12 "C:\Program Files\XnView\nconvert\111.tif" "C:\Program Files\XnView\nconvert\222.tif"

but nothing seems to happen when I run it.
Should I be able to run the bat just like that?

Many thanks for any help.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: runing program and command from "RUN"

Post by xnview »

jesperfj wrote: "C:\Program Files\XnView\nconvert\nconvert.exe" -out jpeg -resize 200 -ratio -sharpen 12 -scaling -rflag orient -rtype lanczos "C:\Program Files\XnView\nconvert\1.tif" "C:\Program Files\XnView\nconvert\2.tif"
Yes you can
Pierre.
jesperfj
Posts: 3
Joined: Sat Oct 04, 2008 1:49 pm

Post by jesperfj »

I'm trying something simple to get it to work.

Simply running this bat-file:

C:\Program Files\XnView\nconvert\nconvert.exe -out jpeg "C:\1.tif"

should convert til file, I believe.
The cmd-window flashes briefly.
What am I doing wrong?
jesperfj
Posts: 3
Joined: Sat Oct 04, 2008 1:49 pm

Post by jesperfj »

ok got it working by doing this in the bat-file:

cd\
cd program files
cd xnview
cd nconvert
nconvert.exe -out jpeg "C:\1.tif"

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

Post by xnview »

Try
"C:\Program Files\XnView\nconvert\nconvert.exe" -out jpeg "C:\1.tif"
Pierre.
Post Reply