Page 1 of 1

How to prevent duplicate endings

Posted: 26 Dec 2025 08:57
by Native2904
I often download icons to create useful CTBs, which usually come in *.png format. I tried to create a button that allows me to convert a selected file directly into an *.ico file. For this, I want to use the command line options of IrfanView. Unfortunately, I don’t know how to prevent the newly created file from ending up with a duplicate extension.

I checked the help section, but due to my lack of in-depth knowledge I couldn’t find anything relevant. Can anyone point out what I’m doing wrong?

Code: Select all

run """C:\Users\Home\Apps\IrfanView\i_view64.exe"" ""<curitem>"" /resize=(256,256) /convert=""<curitem>.ico""";
I have the feeling I’ve read about this somewhere before, but I can’t remember where. :roll:
Edit:Typo

Re: How to prevent duplicate endings

Posted: 26 Dec 2025 10:23
by admin
Instead of <curitem>.ico try <curpath>\<curbase>.ico

Re: How to prevent duplicate endings

Posted: 26 Dec 2025 20:43
by Native2904
Thank you and Merry Christmas.

Re: How to prevent duplicate endings

Posted: 27 Dec 2025 07:44
by WirlyWirly
I use IrfanView myself, but I never thought to check for command line options. Neat!

I did something similar using ImageMagick and python, but as a loop so that it would work on multiple items at once.

Highend went and re-wrote it using XYScript, so you don't even need python. I use it all the time, very handy.

viewtopic.php?p=193338#p193338

Re: How to prevent duplicate endings

Posted: 27 Dec 2025 08:34
by Native2904
2 WirlyWirly

Thank you!
I can add command-line parameters on my own, but when it comes to scripting, that’s where the wheat separates from the chaff. I’m trying to teach myself computer skills — or rather, how to manage files on a computer.
If I had to put it in the words of a five-year-old, I’d say: “You developers are my superheroes.” :ninja:
Thanks also for the script.