Announcement

Collapse
No announcement yet.

Actual file order in a directory

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Actual file order in a directory

    I have a TV that will do a slide show of photos from a USB device. I have a directory of my recent vacation photos with a sub-directory for each location we visited. The photos are properly in order by file name in Dolphin, Digikam and Gwenview. When I copy this directory structure to a USB device and show it on the TV the photos are not in order by file name. I have done research and found that this is a common problem in many devices like TVs and mp3 players. The displayed order and the physical file order in a directory in Linux are not the same. I did find a script called findalpha that stated it would correct this issue by creating a temporary directory and copying files one-by-one, in file name order, and then back to the original directory so that the actual order and file name order match. It doesn't work on my Kubuntu 11.10. The jpg files are still not in file name order on the USB device. I can't seem to locate any other solution. Has anyone else solved this problem?
    An old mainframer trying to get modern in his retirement.

    #2
    Re: Actual file order in a directory

    I assume your USB device is FAT format?

    Try installing and using fatsort

    Please Read Me

    Comment


      #3
      Re: Actual file order in a directory

      That I will do. I didn't look into it as I assumed fatsort was a Windows thing. Silly of me, wasn't it?
      An old mainframer trying to get modern in his retirement.

      Comment


        #4
        Re: Actual file order in a directory

        I just stumbled across it. Report back if it does the trick.

        Please Read Me

        Comment


          #5
          Re: Actual file order in a directory

          Hi
          This has been a very useful thread for moi. I listen to streaming music, and when I am going on a trip of any length in my car I put a bunch of ripped streams on a usb drive and play them on the radio, but as the feature listing said for fatsort, the radio normally plays them in terms of when they were put on the device and that is one of the things that fatsort fixes.

          It is in the repos so can be installed easily.

          Nepomuk is defaulted to "ignoring removeable media" so that "should" mean that one can adjust the file structure in the usb stick and not cause a problem of some kind with Nepomuk.

          thanks for the question and the reply guys!

          woodsmoke

          Comment


            #6
            Re: Actual file order in a directory

            OK - I did the following after installing fatsort from the Kubuntu repos:

            1. Insert the USB stick and create a directory called Photos.
            2. Copy all the directories of photos I want to show into the new directory.
            3. Find the /dev address of the stick
            4. Unmount the stick
            5. execute sudo fatsort -c -oa -D /Photos /dev/sdf1 (substitute your directory name and /dev/address)

            It worked like a charm. Of course, it will work for any type of file, I just wanted jpg files at this moment. The use of a base directory like /Photos allows a single pass sort for everything held under it on the stick.

            I did have some questions so I have been on the eMail with the author, Boris. He was amazingly helpful. Great support on a great little tool. He suggested the unmounted status as the -f argument can be somewhat flaky.
            An old mainframer trying to get modern in his retirement.

            Comment


              #7
              Re: Actual file order in a directory

              Kind of a funny story for me concerning file sorting. My wife bought an external hard drive to copy her movies to watch through the usb port on the DVD set top player. Of course this requires some form of FAT file structure. I couldn't seem to find a way to do that within my Windows partition, but it was easy to format the drive to FAT32 with the KDE partition manager. After a bunch of files were copied to the newly formatted hard drive, my wife unexpectly found the file names grossly out of order when connected to the DVD player. Again, we couldn't find an acceptable way to sort the files from within Windows. Plugged the drive into my USB port, researched and found fatsort. A quick install. Found the drive info from the partition manager, then ran fatsort from a cli.

              Wife's happy and I learned something new I could do with Linus that I wasn't able to do with Windows. Loving this OS more everyday.
              Linux User #454271

              Comment

              Working...
              X