Announcement

Collapse
No announcement yet.

Resurrecting an old slide show

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

    Resurrecting an old slide show

    This question is not so much about IrfanView but more about what's wrong with the .bat file which starts the slide show!

    Here's the story. I found on old cd which had a slide show on it. I executed the .bat file and the slide show ran perfectly on my Windows 7 system. I copied everything off the cd to a folder on a hard disk but when I try to run it from there I get zilch. It's been a long time since I wrote a .bat file so can anyone spot what is preventing it from running from a hard disk?

    Here's the four line .bat file:

    @echo off
    cd %1
    \i_view32.exe /fs /bf /slideshow=%1\usa photo list.txt
    exit

    Any ideas?

    Ian

    #2
    It probably needs the path to i_view32.exe
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      No. The CD is stand-alone and contains its own copy of i_view32.exe. This too was copied to the hard disk folder so it should have been self-contained.

      Ian

      Comment


        #4
        If you are supplying the name of a folder containing i_view.exe to the .bat file as the variable to be replaced by %1 then the line should start just i_view32.exe not \i_view32.exe

        Always add the line Pause to the end of your batch file before the Exit line if it does not work as expected. Then you can see any error messages in the Command prompt window before it closes.
        Last edited by Mij; 21.02.2011, 09:16 PM.

        Comment


          #5
          Putting the Pause statement in allowed me to see that the program had been loaded and it was waiting for user input. I entered the name of the text file containing the list of jpegs and none of them would load!

          This is all rather puzzling as it runs fine under Windows 7 when run from a cd. I'm not going to spend any more time on this - I'll probably never look at the photos again.

          Thanks for your suggestions.

          Ian

          Comment


            #6
            With that change I suggested your batch file runs OK. I just tried it.
            Next time do not put that @echo off line in your batch file until you have debugged it. The echo shows you exactly how the variable was replaced and usually makes it easier to spot where things are going wrong.

            Comment


              #7
              Mij, I have tried your suggestions but they don't help me much. IrfanView is loaded and just sits there. A click on File/Slideshow shows that it wants to read images from the CD drive - weird or what? When I change this to point to the parent folder on disk that now contains the jpegs IV tried to load the image but says it can't.

              Comment


                #8
                Right. So are the paths to the files that are listed in usa photo list.txt still correct?
                It is quite a common problem when using CDs that the drive letter is not the same as when you recorded it.
                Last edited by Mij; 23.02.2011, 03:36 PM.

                Comment


                  #9
                  Here are the first few records in my .txt file.

                  \USA JPEGS\Main Title.jpg
                  \USA JPEGS\Leaving Heathrow.jpg
                  \USA JPEGS\Map - To LA.jpg
                  \USA JPEGS\Title - Disneyland.jpg
                  \USA JPEGS\Disneyland Start Composite 1.jpg
                  \USA JPEGS\Disneyland Riverboat Composite.jpg

                  The path is relative to the current folder so I really don't know why it doesn't work ok off a hard drive as it does a CD.

                  Ian

                  Comment


                    #10
                    You might have set the current folder for Command prompt but you have not set it for Irfanview. The image files will be found if they are relative to the root directory of any drive but unless the location of Irfanview is in the System path variable then they will not be found anywhere else.
                    Take a look at the item shown below in the Help menu. You will see that if you want to specify the files as being always relative to Irfanview then you need to put a . (period or full stop) in front of the paths.
                    Attached Files

                    Comment


                      #11
                      Still no joy. I put in the exact path to the .txt file and it's reading that ok but I'm getting error messages saying that it can't load each successive image. I did put a period in front of each line in the .txt file.
                      Here's my .bat file now:
                      cd
                      i_view32.exe /fs /bf /slideshow=e:\photo album\usa 2000\slideshow.txt
                      PAUSE
                      exit

                      Comment


                        #12
                        Originally posted by imwebb View Post
                        Still no joy. I put in the exact path to the .txt file and it's reading that ok but I'm getting error messages saying that it can't load each successive image. I did put a period in front of each line in the .txt file.
                        Here's my .bat file now:
                        cd
                        i_view32.exe /fs /bf /slideshow=e:\photo album\usa 2000\slideshow.txt
                        PAUSE
                        exit
                        Not quite sure what you are doing now.

                        I stuck to your original scheme passing the name of the folder that contains Irfanview and the images to the batch file using drag and drop. In the first attachment where the folder is called IV_portable the slideshow plays OK. You can see that IV_portable contains i_view32.exe, i_view32.ini, trypics.txt (the list of images using the .\ representation) and the USA JPEGS folder containing the images.

                        The second attachment shows something that does not work. The only difference is that the folder is now called IV portable (i.e. with a space in it). You see in the Command prompt window that the batch file has now added quotes around the path name that is passed because of the space in the folder name and Irfanview then does not recognize the folder name. So there are issues with this form of Command line that you have to be aware of.
                        Attached Files

                        Comment


                          #13
                          Sorry about that - I cut and pasted from the wrong file! I've created a small test folder and reduced the number of files etc. Be assured, the slideshow .txt file DOES contain a period at the start of each filename.

                          Comment


                            #14
                            OK imwebb.
                            The solution turns out to be very simple in the end. Make everything relative to the folder containing the information.

                            You can see in the attachment that I have a single folder (IV anywhere) that can now be put anywhere on the computer. The folder contains i_view32.exe, i_view32.ini, the batch file (slideshow launch.bat), the folder (USA JPEGS) containing the images that are to be shown and the file list (mypics.txt) as in the previous post where all files names are made relative to the folder by using the form .\USA JPEGS\[file name].

                            The batch file does not need a CD command because the Command prompt current folder is by default the file from which the batch file is launched and the mypics.txt file is also now relative to the folder (.\mypics.txt)

                            Run i_view32.exe first and open the slideshow dialog to set all the options that you want (including Automatic after ... seconds if you want the slides to advance automatically and Close IV after last slideshow file if you want it to shut down when finished). Clear any files from the file list in the dialog and press Play Slideshow so that the settings are saved in i_view32.ini.

                            I have included my i_view32.ini in the attachment. You only need that [Slideshow] section initially, though [Open] and [Winposition] sections will be added to it by the program when it runs.

                            So now you should be able to just double click on the batch file and run your slideshow from anywhere at all. No drag and drop or anything needed.
                            Attached Files

                            Comment


                              #15
                              Mij, you are a man of great forbearance! I changed everything to reflect the scenario you've created but still the .bat file would not start the slideshow. However, after copying the latest version of i_view32 into my folder all is now well.
                              What I still don't understand is why the 10-year old copy of i_view32 that I had on my original cd would show the slideshow ok when run from the cd but wouldn't run the slideshow from a hard drive. Oh well, life's too short....
                              Thanks again for all your help.

                              Ian

                              Comment

                              Working...
                              X