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
nconvert unable to use filename substitution
Moderators: XnTriq, helmut, xnview
-
- Author of XnView
- Posts: 44885
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: nconvert unable to use filename substitution
Use: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?
nconvert -out tiff -binary nodither -c 7 -o newfolder\%%.tif *.tif
Pierre.
Thanks, but..
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
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
-
- Author of XnView
- Posts: 44885
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Thanks, but..
Yes, should work. Use %% only in a .bat file.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?
Pierre.
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
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
-
- Author of XnView
- Posts: 44885
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
In a bat?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?
Pierre.
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.
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.
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
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