Results 1 to 7 of 7

Thread: CLI can't handle the sharp (#) symbol

  1. #1

    Exclamation 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. #2
    Moderator Enterprise User Bhikkhu Pesala's Avatar
    Join Date
    May 2007
    Location
    East London
    Posts
    6,271
    OS
    64-bit Win 10
    CPU Cores
    1

    Default

    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

  3. #3

    Default

    Quote 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 at 08:41 AM.

  4. #4
    Moderator Enterprise User Bhikkhu Pesala's Avatar
    Join Date
    May 2007
    Location
    East London
    Posts
    6,271
    OS
    64-bit Win 10
    CPU Cores
    1

    Default

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

    ./i_view32.exe "$N.jpg" /convert="$N out.jpg"

  5. #5

    Default

    Quote 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.

  6. #6

    Default

    Any ideas?

  7. #7
    Moderator Enterprise User Bhikkhu Pesala's Avatar
    Join Date
    May 2007
    Location
    East London
    Posts
    6,271
    OS
    64-bit Win 10
    CPU Cores
    1

    Default

    Send an email to Irfan Skiljan. See Help, About IrfanView for his address.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •