Announcement

Collapse
No announcement yet.

CLI can't handle the sharp (#) symbol

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Solved CLI can't handle the sharp (#) symbol

    Hi!

    I noticed that the command like this:
    ./i_view32.exe "#A/in.jpg" /convert="#A/out.jpg"

    ...ends with the error: Can't load: '#A'

    GUI works okay, but CLI throws this error.

    Could you fix it? I got many folders containing '#' in names.
    Thank you!

    #2
    I am no expert on command line arguments, but I don't think this is a bug. # is reserved for filename patterns in command line commands like:

    i_view32.exe c:\*.jpg /resize_long=300 /aspectratio /resample /convert=d:\temp\outimage_###.jpg
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      Originally posted by Bhikkhu Pesala View Post
      I am no expert on command line arguments, but I don't think this is a bug. # is reserved for filename patterns in command line commands like:

      i_view32.exe c:\*.jpg /resize_long=300 /aspectratio /resample /convert=d:\temp\outimage_###.jpg
      Seems like you're right.
      Hm. Is there a way to escape the sharp symbol so it's being treated as a filename, not pattern?

      Or may be there is a way to disable patterns?

      How GUI works? It works somehow
      Last edited by olegcherr; 10.12.2019, 08:41 AM.

      Comment


        #4
        Batch rename dialogue uses $N for input filename. Try using that in your command line.

        ./i_view32.exe "$N.jpg" /convert="$N out.jpg"
        Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

        Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

        Comment


          #5
          Originally posted by Bhikkhu Pesala View Post
          Batch rename dialogue uses $N for input filename. Try using that in your command line.

          ./i_view32.exe "$N.jpg" /convert="$N out.jpg"
          Seems like it's not what I'm looking for... Let me explaing what I need exactly.

          I added a command in my Explorer Context menu. The command looks like:
          "C:\Program Files (x86)\IrfanView\i_view32.exe" "%1" /convert="%1" /jpgq=65

          It resaves the selected file with 65% JPG quality.
          But if the file path contains '#', then the error is being thrown.

          So I need a way to make IrfanView handle '#' as a regular symbol, not pattern.

          Comment


            #6
            Any ideas?

            Comment


              #7
              Send an email to Irfan Skiljan. See Help, About IrfanView for his address.
              Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

              Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

              Comment


                #8
                See this reply by Andy250:

                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.
                Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                Comment

                Working...
                X