Announcement

Collapse
No announcement yet.

Small bug/quirk in file name of screenshots

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

    Small bug/quirk in file name of screenshots

    Hi,

    The Screenshot feature is great, but there seems to be a small bug/limitation in the file name generation when the name has many characters.

    In Capture Setup (Options menu > Capture/Screenshot), when I try to give a file name for the captured image which is long, then the placeholders (%d = day, %m = month, %Y = year etc) are not replaced and appear unchanged as "%d", "%m", "%Y" in the file name.

    This happens for all placeholders after character number 60 or so.

    Sometimes it's really useful to use longer file names for clarity. Could the developers look at this quirk?

    Thanks.

    (tested with IrfanView 4.36 on Windows 7 64 bit)

    #2
    I have no problems with filenames over 150 characters long. Are you sure you did take the limitations of the operating system into account?
    IrfanView 4.62 64-bit

    Comment


      #3
      What limitations of the operating system?

      Windows 7 doesn't have that kind of limitation. I can easily rename the files to much more than 60 characters in Explorer, and in IrfanView choosing a very long name which doesn't include placeholders creates no problems.

      The problem is that if the name includes placeholders, IrfanView doesn't replace them after more than 60 characters or so.

      Example:
      if I try with the following file names in IrfanView, adding 10 characters each time

      Code:
      "123456789 123456789 123456789 123456789 %Y.%m.%d %Hh%Mm%Ss"
      "123456789 123456789 123456789 123456789 123456789 %Y.%m.%d %Hh%Mm%Ss"
      "123456789 123456789 123456789 123456789 123456789 123456789 %Y.%m.%d %Hh%Mm%Ss"
      then the screenshot files have the following names:

      Code:
      "123456789 123456789 123456789 123456789 2013.10.09 18h14m44s.jpg"
      "123456789 123456789 123456789 123456789 123456789 2013.10.09 18hm%Ss.jpg"
      "123456789 123456789 123456789 123456789 123456789 123456789 %Y.%m.%d %Hh%Mm%Ss.jpg"
      The first example works correctly but in the next two examples, after character number 60 IrfanView doesn't replace the placeholders %Y, %m, %d etc... This seems to be a real bug.

      Comment


        #4
        But where do you put these files? What is the length of the complete path?

        "Windows usually limits file names to 260 characters. But the file name must actually be shorter than that, since the complete path (such as C:\Program Files\filename.txt) is included in this character count." (Microsoft)

        I was able to create 150 characters long filename with working placeholders on a root directory - d:\verylongfilename.jpg, but certainly unable to move it to a directory with a 150 characters long name - d:\verylongfoldername\verylongfilename.jpg > 260.

        http://msdn.microsoft.com/en-us/libr...9.aspx#maxpath

        http://windows.microsoft.com/en-us/w...sked-questions

        If you are under 260, then I would like to find a way to reproduce the problem.

        Have a nice evening!
        Last edited by Jacal; 09.10.2013, 06:35 PM. Reason: Typo
        IrfanView 4.62 64-bit

        Comment


          #5
          It was worth a try but changing the destination directory to C:\ does not change anything at all, the character number after which the placehodlers are not replaced anymore is exactly the same. The experiment above with the three names gives exactly the same result.

          And in any case it would be surprising if it was related to long name limitations in the OS, because then why does a very long name WITHOUT placeholders create no problem? It's only IrfanView's replacement of the placeholders which fails, a very long name is preserved correctly, only the placeholders after a certain character number are untouched instead of replaced.

          Are you sure that if you copy/paste the string
          Code:
          123456789 123456789 123456789 123456789 123456789 123456789 %Y.%m.%d %Hh%Mm%Ss
          inside IrfanView 4.36 with destination C:\ then you don't get simply
          Code:
          123456789 123456789 123456789 123456789 123456789 123456789 %Y.%m.%d %Hh%Mm%Ss.jpg
          as the screenshot's file name?



          Good evening to you...

          Comment


            #6
            Try this:

            Code:
            123456789_123456789_123456789_123456789_123456789_123456789_123456789_capture_###_$U(%d%m%Y_%H%M%S)
            It is longer than your example and it should work. With your syntax I have the same result as you.

            --
            Sorry, I didn't see your answer until I posted this.
            Last edited by Jacal; 09.10.2013, 07:12 PM.
            IrfanView 4.62 64-bit

            Comment


              #7
              Okay so it's possible to solve this quirk by adding $U to
              Code:
              %Y.%m.%d %Hh%Mm%Ss
              The placeholder
              Code:
              $U(%Y.%m.%d %Hh%Mm%Ss)
              works correctly even with very long file names like
              Code:
              123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 $U(%Y.%m.%d_%Hh%Mm%Ss)
              saved into a directory with a rather long path name.

              Apparently the %d %m %Y etc placeholders are only meant to be used enclosed inside a $U(...) placeholder, otherwise the result has some strange quirks: these placeholders are only options that specify/alter the meaning of the $U placeholder, which already means "current system date/time"...

              Thanks for sticking with this problem.

              Comment

              Working...
              X