# Thread: Image resize output path hash / number sign is converted to 1

1. ## Image resize output path hash / number sign is converted to 1

Hi! I am using i_view64.exe to do command-line resizing. I have a problem with the output path. When it contains # (hash / number sign) then the hash is converted to '1'. My command:

i_view64.exe "C:\input\image #2 40.jpg" /resize=(1600, 0) /silent /jpgq=80 /aspectratio /resample /convert="C:\output\image #2 40.jpg_Large.jpg" /ini="C:\path\to\ini"

In the output folder I am getting a file named "image 12 40.jpg_Large.jpg". Is this some kind of feature that I don't know about or is this a bug? I tried version 4.5 and 4.54.

2. Irfanview uses the # sign as a placeholder for a counter. The number of #s is the number of the digits that will come out.
E.g. ### stands for 001 to 999.
I use this function to number screenshots.

3. Thanks Kuki. That makes sense. Is there a way to escape the hash sign in output path? I use irfanview with files that I do not control (so filenames and their output path may contain arbitrary number of hash signs). Replacing the numbers back to hashes would be quite cumbersome in my case.

4. I assume that this behaviour is hard coded in iview_32.exe/i_view64.exe, so there will be no way to escape this function. If possible, use a decent tool
to replace # with another sign, e.g. !. After using IrfanView you can then do it the other way round.
You may also write to Irfan Skiljan and ask if he has a more elegant solution. See Help - About for his e-mail adress.

5. Thanks, I contacted Irfan and he directed me in the right direction - I run 2 replacements:
$-->$$# -->$#
(in the output path)
This seems to do the trick. $is a kind of escape character it seems. 6. Andy250, thank you for sharing Irfan's answer with us. I might help others wit a similar problem. 7. This behavior was not in version 4.27 This is something that was added since that version. I upgraded to version 4.54 when I implemented Windows 10. This is giving me a real headache as I now have to rewrite all my scripts and all calls to irfanview in my applications. Is there some other switch in the command line to turn off this behavior? 8. Either install 4.27 and use that, or contact Irfan Skiljan to see if he can offer any suggestions. 9. There is a very handy option$N that when used in the /convert= string will duplicate the original file name without implementing the # substitution.

In this case you could do the following:

i_view64.exe "C:\input\image #2 40.jpg" /resize=(1600, 0) /silent /jpgq=80 /aspectratio /resample /convert="C:\output"\$N"_Large.jpg" /ini="C:\path\to\ini"

Your result would be a file named "image #2_Large.jpg" in folder "C:\output"