Page 1 of 1

nconvert unable to use filename substitution

Posted: Wed Feb 23, 2005 10:17 am
by simes
Hi,

I want to convert all the tif files in one folder into a different folder using wildcards. I cannot get the %% filename substitution suggested in the help info to work.. I have tried it with single quotes, double quotes, double %% signs etc. I have tried from the command line, and in batch files. No joy.

I am doing this on a Windows 2003 SBS server.

e.g. nconvert -out tiff -multi -binary nodither -c 7 -o newfolder\%%.tif *.tif

any clues?

thanks

Re: nconvert unable to use filename substitution

Posted: Wed Feb 23, 2005 2:14 pm
by xnview
simes wrote:Hi,

I want to convert all the tif files in one folder into a different folder using wildcards. I cannot get the %% filename substitution suggested in the help info to work.. I have tried it with single quotes, double quotes, double %% signs etc. I have tried from the command line, and in batch files. No joy.

I am doing this on a Windows 2003 SBS server.

e.g. nconvert -out tiff -multi -binary nodither -c 7 -o newfolder\%%.tif *.tif

any clues?
Use:
nconvert -out tiff -binary nodither -c 7 -o newfolder\%%.tif *.tif

Thanks, but..

Posted: Fri Feb 25, 2005 9:38 am
by simes
Piere.

Your suggestion is the same syntax as I have been using without success (apart from the fact that you removed the "-multi" - I assume this has no bearing on the filename substitution).

Are you saying that -o newfolder\%%.tif should work OK?

thanks

Re: Thanks, but..

Posted: Fri Feb 25, 2005 11:49 am
by xnview
simes wrote:Piere.

Your suggestion is the same syntax as I have been using without success (apart from the fact that you removed the "-multi" - I assume this has no bearing on the filename substitution).

Are you saying that -o newfolder\%%.tif should work OK?
Yes, should work. Use %% only in a .bat file.

Posted: Wed Apr 02, 2008 2:24 am
by Georgef
I am also experiencing this problem but I noticed that it only occurs when using "-multi " or "-xall"

for example using:
nconvert -out tiff -binary nodither -c 7 -o newfolder\%.tif test.tif
outputs a file named: test.tif

but using:
nconvert -out tiff -multi -binary nodither -c 7 -o newfolder\%.tif *\test.tif
outputs a file named: %.tif

Any ideas?
(Note I am using version v4.92)

Thanks

Posted: Wed Apr 02, 2008 7:00 am
by xnview
Georgef wrote:I am also experiencing this problem but I noticed that it only occurs when using "-multi " or "-xall"

for example using:
nconvert -out tiff -binary nodither -c 7 -o newfolder\%.tif test.tif
outputs a file named: test.tif

but using:
nconvert -out tiff -multi -binary nodither -c 7 -o newfolder\%.tif *\test.tif
outputs a file named: %.tif

Any ideas?
In a bat?

Posted: Wed Apr 02, 2008 2:08 pm
by Georgef
No, not from a bat. I am running from the command prompt.
Following are three examples of the actual commands & the resulting output from the command prompt:

-------------------------------------------------------------------------------------------------

C:\>c:\00\nconvert.exe -out tiff -binary nodither -c 7 -o c:\00\out\%.tif c:\00\test.tif
** NCONVERT v4.86 (c) 1991-2007 Pierre-E Gougelet (Jan 29 2008/13:24:04) **
Version for Windows NT/9x/2000/Xp/Vista (All rights reserved)
** This is a freeware software (for non commercial use)

Conversion of c:\00\test.tif into c:\00\out\test.tif OK

-------------------------------------------------------------------------------------------------

C:\>c:\00\nconvert.exe -out tiff -multi -binary nodither -c 7 -o c:\00\out\%.tif c:\00\test.tif
** NCONVERT v4.86 (c) 1991-2007 Pierre-E Gougelet (Jan 29 2008/13:24:04) **
Version for Windows NT/9x/2000/Xp/Vista (All rights reserved)
** This is a freeware software (for non commercial use)

Conversion of c:\00\test.tif into c:\00\out\%.tif OK
Conversion of c:\00\test.tif into c:\00\out\%.tif OK
Conversion of c:\00\test.tif into c:\00\out\%.tif OK
Conversion of c:\00\test.tif into c:\00\out\%.tif OK

-------------------------------------------------------------------------------------------------

C:\>c:\00\nconvert.exe -out tiff -xall -binary nodither -c 7 -o c:\00\out\%.tif c:\00\test.tif
** NCONVERT v4.86 (c) 1991-2007 Pierre-E Gougelet (Jan 29 2008/13:24:04) **
Version for Windows NT/9x/2000/Xp/Vista (All rights reserved)
** This is a freeware software (for non commercial use)

Conversion of c:\00\test.tif into c:\00\out\%-0.tif OK
Conversion of c:\00\test.tif into c:\00\out\%-1.tif OK
Conversion of c:\00\test.tif into c:\00\out\%-2.tif OK
Conversion of c:\00\test.tif into c:\00\out\%-3.tif OK

-------------------------------------------------------------------------------------------------

Each of these created the expected files, but the file names were not as expected.

Thank you for your attention.

Posted: Fri Apr 11, 2008 8:45 pm
by Mango Juice
Georgef: I'm unsure, but if you're doing ONLY one file you do not need to use the % symbol. If you want to change multiple files, then you should use % and * respectively.

Give it a try. Even if you only have test.tif available in the 'source' folder, instead of specifying the file name go *.tif, and see if it works!

Cheers :)