Announcement

Collapse
No announcement yet.

File sorting

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

    File sorting

    When i watch a gallery of images, it start on number 1 and continues, tho irfanview doesnt go 123456789.... Instead it goes 1,10,101,1001,11,110,1101,12,120,2, any ways to fix this?

    #2
    From the help:
    The sort option by Name differs from by Name (XP style) by a different interpretation of numbers in file names. With by Name File10.jpg is sorted before File1.jpg. With Name (XP style) the sort order is File1.jpg before File10.jpg.
    Get Radio? Sure! - the best Internet Radio Player ever?

    Comment


      #3
      yes, but i want it to go 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, not the other way

      Comment


        #4
        Originally posted by zanxil View Post
        yes, but i want it to go 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, not the other way
        Then use the Sort by XP order as suggested.
        Attached Files
        Before you post ... Edit your profile • IrfanView 4.67 • Windows 10 Home 19045.2486

        Irfan Paint • Irfan View Help • IrfanPaint Help • More Skins • FastStone Capture • Uploads

        Comment


          #5
          thanks, i didnt completely understand what he said at first :O

          Comment


            #6
            Now this is quite a bit offtopic, but nonetheless valuable information.

            I recently found out that the XP-style can actually be turned off. I just wish they made the Group Policy editor a little more user friendly and less obscure (searchable, without ambiguous uses of the word “enabled”). Here is the actual setting, controllable later from within Folder Options.

            Code:
            REGEDIT4
            
            [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\List Order]
            "Type"="checkbox"
            "Text"="Disable logical sorting"
            "ValueName"="NoStrCmpLogical"
            "CheckedValue"=dword:00000001
            "UncheckedValue"=dword:00000000
            "DefaultValue"=dword:00000001
            "RegPath"="Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer"
            "HKeyRoot"=dword:80000001
            
            [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
            "NoStrCmpLogical"=dword:00000001
            Had a good laugh about these paragraphs posted on MSDN. Alot from this resource and Windows Knowledge Base should have made into Windows Help, instead of instructions how to use the black X to close the active window.

            The normal sorting method is the method that has existed for ages on computers and with which a geek is likely to be most comfortable – treating numbers as bits of text, each individual number of which is compared to an individual letter. You can get it by calling CompareString or LCMapString, and everything is great.

            Unfortunately, it is also incredibly nonintitive to all of the people who are not geeks. Try explaining to your mom that 30.txt is supposed to come after 100.txt. It's not a pretty sight:

            Mom: It just makes no sense to me, dear. 30 is less than 100!
            Son: Yes, when it's a number. But what about when you treat it as text?
            Mom: How can a number be text?
            Son: Well, anything can be text. There is a difference between 4 and "4".
            Mom: <shakes head> It just makes no sense to me, dear.


            After the posted solution discussion in comments continued. One guy pointed out that Thai numbers should be added to logical sorting. Another person then made it clear that very odd results would be output such as:

            one.txt
            four.txt
            elf.txt
            sex.txt
            one hundred.txt

            And then there are hexadecimal numbers, which only human can tell apart from a general string. In the end even the most user friendly of geeks agreed that this type of sorting is a pain while doing development.
            Last edited by j7n; 06.05.2008, 12:51 AM.

            Comment


              #7
              So it's much more convenient to first add a leading zero to rename 1.jpg to 01.jpg.
              0.6180339887
              Rest In Peace, Sam!

              Comment


                #8
                That's the way text sorting works!

                To "fix" this problem use file names with fixed length!

                For example file00001, file00002, and so on!

                Comment


                  #9
                  Nice to see someone recognizing my point.
                  OT: with TC's multi-rename tool this is just piece of cake. Just choosing the number of digits.

                  any ways to fix this?
                  I don't see this as a property of the system that should be 'fixed', because it just does what it should do, according to the ascii-rules.
                  Fixing the practical representation as preference is another thing.

                  irfanview doesnt go 123456789
                  Not correct. It goes 0123456789.

                  To keep the right order it even can go further. Because the alfabet trails the numbers.
                  So if the last one is track 10, I would need two digits from e.g. 01 - 10.
                  One could achieve the same using one digit by naming the files 1 - A.
                  0.6180339887
                  Rest In Peace, Sam!

                  Comment


                    #10
                    I don't like how computers are now required to deal with the mess that is called human culture.

                    It just came to me that there are languages using the opposite writing direction (Israel, Arab). That's more than just a couple hundred new letters. Are we gonna see this nonsense in filenames soon? I wonder how sorting could be implemented.

                    Comment


                      #11
                      I agree with j7n that current systems (and also net-syntaxes) are based on the western model, so can't easily cope with other things.
                      A complicated factor is, that a system could have been set in a local language version, while a name of a file could be made in another language.
                      Maybe originally written form right to left. This is where Unicode-compatibility comes into the picture.
                      If this is recognized, the sorting of files still wouldn't be much of a problem.
                      Just a matter in the routine to change the detection of the position of 1st character and last one.
                      Unicode is afaik just a 16-bit variant of the ascii-code, so the same order-rules in value could be valid.

                      The Chinese and Japanese already have adapted their writing on the computer to do it horizontally,
                      instead of the originally vertical style. I wonder about making a file order of pictograms...
                      0.6180339887
                      Rest In Peace, Sam!

                      Comment


                        #12
                        Originally posted by zanxil View Post
                        When i watch a gallery of images, it start on number 1 and continues, tho Ifanview doesn't go 123456789.... Instead it goes 1,10,101,1001,11,110,1101,12,120,2, any ways to fix this?
                        This is a problem that I have been hunting a solution for, for some time now, and I'm not sure there really is one. The trouble is that I need to be able to tell where I am in a folder with say 5,000 files, so that I can manipulate a large number of files at once.

                        For example, working in IrfanView I find file names 1.jpg to 200.jpg and see that I don't want any of them. I go to the open folder on my desktop, highlight the 200 files and delete them.

                        But if I use IrfanView for this I can't match the file it displays with the next file in an XP folder. Because I can't predict the sort order by glancing at the folder. That is I expect to find the next file viewed to be the next one in my folder.

                        The fact that Irfanview follows the rules and does its sort correctly, ie that Irfanview is "right", is not relevant to solving the problem. (This is a case of an application telling the OS how "it should be", yes the app is right, but the OS is ring zero so it wins.)

                        I have not found a way to alpha sort an XP folder so that it will walk through a tree the same way as programs like Ifanview, if someone knows of one, that works on the fly and then lets me restore the original XP behavior also on the fly, then PLEASE let me know!

                        Some viewers, LView, Fast Picture Viewer, simply follow the directory tree, which means they will display files in the exact order you see them in a "Sort by Name" listing in a folder. Others, Irfanview, Nero Viewer, ect, impose the ascii sort order rules and so they will never follow an XP folders sort order.

                        I noted that Irfanview had a "no sort" option in the thumbnails and thought, "at last a viewer I really like that will let me work with XP folders". I'm not sure what "no sort" is supposed to do but it does not load the tree out of the directory and then just walk it. (Unless I'm doing something wrong "No Sort" is identical to Sort XP style.)

                        Some people suggest adding a 0, this alone won't work. ie. 012 will be followed by 0120 not 013. If you also set all file names to a fixed width, say the old 8.3 standard, and prefix pad the numbers, it might match an XP folder. Of course that means you don't use descriptive file names, sort of like going back 20 years in file name conventions, but that's how it is.

                        You can resort your XP folder based on Size and then tell IfanView to sort by Size and they will match, but that in turn means that finding a place in the folder is problematic at best.

                        The best work around that I can see is to do everything within IrfanView, using the Thumbnails option as your working folder. ie, the window displayed by Thumbnails is very similar to an XP folder in Thumbnails view, with the files displayed in the same sort order as the viewer window flips through them.

                        In a perverse quirk of fate, as if there was any other kind, IrfanView's Thumbnail folder would work for my need IF I could set it to file name list! LOL. As it is working with so many files out of Thumbnail view is a bit unwieldy.

                        Comment


                          #13
                          I guess I'm a little confused. Why don't you want to sort by name using XP style, which would match Windows? Why don't you batch rename the files to match XP style?

                          No sort allows you to have a custom sort that you can manually arrange in the thumbnail window.

                          If you do really want to sort by name in IrfanView, you could use Search Files to get a list and remove the ones you want to keep, leaving the ones you want discarded. Then load them in Thumbnails, but stop them from loading. Select them all (CTRL+A) and delete.

                          If you are viewing each image, you could delete as you go.

                          You might try changing the way XP sorts. Take a look here.

                          The easiest way would be to just use FreeCommander, a file manager similar to Windows Explorer. I believe it sorts by name unlike XP.
                          Last edited by Skippybox; 08.10.2008, 12:24 AM.

                          Comment


                            #14
                            Originally posted by Skippybox View Post
                            I guess I'm a little confused. Why don't you want to sort by name using XP style, which would match Windows? Why don't you batch rename the files to match XP style?

                            No sort allows you to have a custom sort that you can manually arrange in the thumbnail window.

                            If you do really want to sort by name in IrfanView, you could use Search Files to get a list and remove the ones you want to keep, leaving the ones you want discarded. Then load them in Thumbnails, but stop them from loading. Select them all (CTRL+A) and delete.

                            If you are viewing each image, you could delete as you go.

                            You might try changing the way XP sorts. Take a look here.

                            The easiest way would be to just use FreeCommander, a file manager similar to Windows Explorer. I believe it sorts by name unlike XP.
                            First, thank you for the reply.

                            I know how to change XP's sort order, which is why I used the phrase "on the fly" as I have to preserve XP's normal behavior for the systems in question.

                            I am actually looking at this for group, and I'm trying to find a better solution for them the the process I'm describing, which is the one they currently use. This is why some of the constraints I'm pointing out have to be lived with. If they start using a new viewer I'm sure they won't mind paying for it though.

                            They use Photoshop for serious work on individual files but they often have to dig through large numbers of files to mine what they need, or they may actually be adding new photo's in fairly large numbers.

                            I'll look at FreeCommander, does it have a fee for office / professional use? I'm also not sure about teaching a bunch of film people how to use another app, if it's behavior is a lot like Explorer that might not even be a problem.

                            XP style sort doesn't actually follow an XP tree directory. Here is an example from a directory I am currently experimenting with.

                            !01 wow 1.jpg --- 1st file in folder using list view.
                            !4hgr.jpg --- 2nd file in folder
                            !!!00c74.jpg --- 3rd file in folder
                            !!!0c775.jpg --- 4th file in folder
                            !!!10q86.jpg --- 5th file
                            !!!!b437.jpg --- 6th file

                            XP Style sort returns:
                            !!!!b437.jpg --- 1st file in sort, 6th file in folder
                            !!!!b440.jpg --- next in sort, 7th in folder.

                            I have to preserve original file names so rename is out. Even if I didn't, going back to fixed length file names would not be a good solution.

                            Some folders have thousands of files, it is much easier to work with them out of a folder, and working each file as I go would be tedious at best. The total number of pictures being worked with is in the 100's of thousands.

                            Currently I may view say 50 files, to keep it simple, say the first 10 are Butte Point east approach, the next 5 are west, the next 3 are east, now back to 15 on the north slope, etc.

                            Ok, now all I need at this point is to retain the first 3 of the 10 east, two of the west, none of then next 3 east again, and 5 of the 15 north, and move them into folders labeled East, West, North South. Now multiply that by a factor of 10,

                            I am simply not going to sit a make a key press for each file to move it to the target directory, delete it or skip it. Instead, at this point I glance at the folder and drag the first 3 to the target East folder, run the viewer up to where I see the next 5 of North, skip the mouse over to them and move them, back to the viewer to find the next group, then cursor and move that group. Remember I'm actually talking about grabbing 30, then 20. During this I find some worthless shots so I delete them as I go but others I leave in the source folder, or there may be one shot totally out of order that needs to be moved by itself.

                            OK, if your still with me, now I'm at the 2,831st file in the folder, the viewer wants to show me a file that is 22 files ahead of my currently selected file, in the folder, instead of the next one, then maybe it shows me one that is 100 files behind that one, then shows me one that is 50 back ahead.

                            A sort order that is useless to me even though it is the "right' one. If I'm using thumbs I've had to scroll 2,800 thumbs at this point, which doesn't give me enough file names in a small enough space to be effective. The thumbs themselves don't show enough detail to make a determination so the picture it self must be viewed. (Irfanview's zoom is great for this.)

                            As I work I can easily see, file !!!x1 is the start point, file !!!x320 is the end point for the north set, select those 320 and move them. Except there may be 3 east approach shots right in the middle, so I will move those using individual key strokes, IrfanVeiw's move function is great at this part but not at selecting and moving the 317 files as a group.

                            Currently I use LView, which has other problems and isn't as good a solution for my needs as IrfanView seems it might be, but it does traverse the directory directly, ie it doesn't sort but just reads the next file in the tree.

                            As I said Irfanview's move function is great and as I get used to the hot keys it is fast, but again with lots of files it's too may key presses. I can highlight the files I need, and even use standard window selection methods out of the thumbnail view, but the thumbnails are not a good solution for my work flow. Hence my comment that it would be great for me if Thumb view could be switched to list view. :}

                            I may have to live with this limitation of IrfanView until I find a solution that basically does what IrfanView offers with a straight directory tree traversal algorithm.

                            I've been through 9 viewer apps so far and IrfanView is easily the best solution for rapid file viewing, when I add in that it has a pretty good editor, for a lot of things it would be much better then loading up Photoshop, it makes for an impressive little app that's not as bloated as some others I won't name. <GRIN>

                            Over all it is nearly perfect, and for my personal use it will become my solution of choice.

                            OT:
                            BTW, Is there some way to use it to import a second image into the current one. For example, say I scan 2 pages of a landscape and I want to make one jpg of them, is there an easy way to do that in IrfanView or is it better to just use Photoshop?

                            Comment


                              #15
                              Originally posted by Skippybox View Post
                              The easiest way would be to just use FreeCommander, a file manager similar to Windows Explorer. I believe it sorts by name unlike XP.
                              Went through FreeCommander, it does match IrfanView's sort order, and once I turned off a bunch of features it looks simple enough to not require much, if any, user training. Of course keeping users from getting themselves into trouble with it is another story. It's too bad the FreeCommander's internal viewer isn't quite full featured enough to meet their needs by itself.

                              The look and feel to FreeCommander reminds me a bit of Norton Commander from back in DOS days, I wonder if that was an influence. I used NC and Sidekick to death back in the day.

                              Thanks for the help here. Between FreeCommander, Irfanview, and a couple of macro's I'm hopeful I can put this to project to bed.

                              I'm donating my time to help them solve this, the group is working on climate change and they aren't rolling in dough, though it was just a few hours over the weekend, still I'm really glad to get it done.

                              Thanks again.

                              Comment

                              Working...
                              X