Problem - spaces and wildcards in parameters

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

Moderators: helmut, XnTriq, xnview

Post Reply
lzoch1
Posts: 3
Joined: Tue Oct 18, 2011 9:05 am

Problem - spaces and wildcards in parameters

Post by lzoch1 »

Hello, is there any solution for this problem ?

Nconvert.exe knows wildcards, but without quotations only, or knows quotations, but without wildcards only.
Is any possibility how to correctly use this command?

nconvert.exe [other parameters] -o c:\destination dir\%.jpg c:\source dir\*.jpg

where "c:\destination dir" and "c:\source dir" are real names of directories (with spaces). In destination dir can be used underscores (_) instead of spaces, but source dir can be on CD - any renaming as not possible.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Problem - spaces and wildcards in parameters

Post by xnview »

Do you have tried:

nconvert.exe [other parameters] -o c:\destination dir\%.jpg c:\source^ dir\*.jpg
Pierre.
lzoch1
Posts: 3
Joined: Tue Oct 18, 2011 9:05 am

Re: Problem - spaces and wildcards in parameters

Post by lzoch1 »

xnview wrote:Do you have tried:

nconvert.exe [other parameters] -o c:\destination dir\%.jpg c:\source^ dir\*.jpg

Sorry, it doesn't work. I will describe my situation:

Directory structure:
---------------------------

C:.
+---!!
| +---destination dir
| +---source dir ---Image1.jpg


Using CONVERT.BAT file which include:
----------------------------------------------------------
Nconvert.exe -ratio -rflag orient -resize 640 480 -rtype lanczos -out jpeg -q 75 -o c:\!!\destination dir\%.jpg c:\!!\source^ dir\*.jpg


This is output from BAT file(error):
------------------------------------------------


c:\!!>convert.bat

c:\!!>Nconvert.exe -ratio -rflag orient -resize 640 480 -rtype lanczos -out jpeg -q 75 -o c:\!!\destination dir\\!!\source dir\*.jpg

** NCONVERT v5.75 (c) 1991-2010 Pierre-E Gougelet (Sep 7 2010/11:24:20) **
Version for Windows NT/9x/2000/Xp/Vista/7 (All rights reserved)
** This is a freeware software (for non commercial use)

Error: Can't open file (dir\\!!\source)

Error: Can't open file (dir\*.jpg)

c:\!!>


Can you help me, what is wrong?
Many thanks!
Ladislav
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Problem - spaces and wildcards in parameters

Post by xnview »

Ok, so here the only way is to use a bat command + for
Pierre.
lzoch1
Posts: 3
Joined: Tue Oct 18, 2011 9:05 am

Re: Problem - spaces and wildcards in parameters

Post by lzoch1 »

xnview wrote:Ok, so here the only way is to use a bat command + for
Thank you, the best way will be using XNconvert, there are no problems with spaces, diacritics and so on in directory- and file-names.

Ladislav
Post Reply