Page 2 of 2 FirstFirst 1 2
Results 11 to 16 of 16

Thread: always suggest current dir for batch conversion

  1. #11
    Professional User Skippybox's Avatar
    Join Date
    Jul 2008
    Location
    Detroit, MI USA
    Posts
    2,030
    Version
    IrfanView 4.25
    OS
    32-bit Win XP Home SP2
    CPU Cores
    1

    Default

    Here is the script I was talking about (and you helped create ):

    Code:
    @echo off
    setlocal enabledelayedexpansion
    
    set input=%1
    set path=%~d1%~p1
    set install=D:\appz\IrfanView\
    set ini1=i_view32.ini
    set ini2=iv_tmp.ini
    
    if exist %install%%ini2% del %install%%ini2%
    for /f "tokens=* delims=" %%a in (%install%%ini1%) do (
    
    set write=%%a
    if "!write:~0,11!"=="OutputPath=" set write=OutputPath=%path%
    (echo !write!)>>%install%%ini2%
    )
    
    del %install%%ini1%
    ren %install%%ini2% %ini1%
    
    %install%i_view32.lnk %input%
    Basically, just drop a file on the script file (or use another method) and it will write the revised ini before loading your image in IrfanView for you. Go in to Batch and voilà, your output directory matches the input directory!

    Obviously, test prior to implementation. I hope there are no other OutputPath's in the ini.
    Last edited by Skippybox; 11.12.2008 at 09:59 PM. Reason: Updated Script-Fixed errors

  2. #12
    Multiple User boarder's paradise's Avatar
    Join Date
    Sep 2008
    Posts
    290
    Version
    IrfanView 4.20

    Default

    That's a very clever idea. I am certainly going to test that out in the next days, this works for sure! You know, you could have just told me the idea and let me figure out the script as well You reaaaally make me have bad conscious now ... Thanks so much.

  3. #13
    Multiple User boarder's paradise's Avatar
    Join Date
    Sep 2008
    Posts
    290
    Version
    IrfanView 4.20

    Default

    Shit ... I forgot this: I have my image file formats associated with IrfanView. I just hit enter or double click them and IV starts. I think it will be require some registry hacking to replace the file association for all image files with this batch script ...

  4. #14
    Multiple User boarder's paradise's Avatar
    Join Date
    Sep 2008
    Posts
    290
    Version
    IrfanView 4.20

    Default

    BTW, just out of curiosity ... I looked to find Irfan's last post here and couldn't find a single one. Is that possible ? He is not in the alphabetical user list. But in the advanced search, if you search by user, "Irfan Skiljan" is auto-suggested if you enter the first letters, but no post is found. And I never saw him around here either. How can I find his postings ?

  5. #15
    Professional User Skippybox's Avatar
    Join Date
    Jul 2008
    Location
    Detroit, MI USA
    Posts
    2,030
    Version
    IrfanView 4.25
    OS
    32-bit Win XP Home SP2
    CPU Cores
    1

    Default

    Quote Originally Posted by boarder's paradise View Post
    You know, you could have just told me the idea and let me figure out the script as well You reaaaally make me have bad conscious now ... Thanks so much.
    Well, I like the challenge. Perhaps, but you always had the chance to come up with it. Even after you got the core code to work. That was a hint. So sorry.

    Quote Originally Posted by boarder's paradise View Post
    Shit ... I forgot this: I have my image file formats associated with IrfanView. I just hit enter or double click them and IV starts. I think it will be require some registry hacking to replace the file association for all image files with this batch script ...
    Yah, I didn't like making such an integration. You don't always need the functionality all the time. I figured you could alter your method to accommodate this. If you put the script in Send To, you can send any file using the shell menu. If that is too slow, you should get in the habit of dropping files on a shortcut that is always visible.

    Quote Originally Posted by boarder's paradise View Post
    BTW, just out of curiosity ... I looked to find Irfan's last post here and couldn't find a single one. Is that possible ? He is not in the alphabetical user list. But in the advanced search, if you search by user, "Irfan Skiljan" is auto-suggested if you enter the first letters, but no post is found. And I never saw him around here either. How can I find his postings ?
    I didn't think he was a member. I don't recall him ever posting. Maybe it is an entry made by the administrator to facilitate the Project Tools. I really don't know how he does things. Basically, his presence is nonexistent on the forum.

  6. #16
    Professional User Skippybox's Avatar
    Join Date
    Jul 2008
    Location
    Detroit, MI USA
    Posts
    2,030
    Version
    IrfanView 4.25
    OS
    32-bit Win XP Home SP2
    CPU Cores
    1

    Default

    Looks like we need to change the code. Update.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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