Sorting Files

Applies to all operating systems.

Why don't my pictures or music play in order from my USB or CD?

You take hundreds of photos on your trip overseas, download them to your computer and they have a file name like this:

IMG_0001.JPG
IMG_0002.JPG
IMG_0003.JPG
IMG_0004.JPG
IMG_0005.JPG
IMG_0006.JPG
IMG_0007.JPG

You then copy them to a USB or burn them to a CD and play them on your TV and they play in order.

However:

If You use a photo editing program like Picasa to clean them up and give them new names like this:

Rome1.jpg
Rome2.jpg
Rome3.jpg
Rome4.jpg
Rome5.jpg
Rome6.jpg
Rome7.jpg
Rome8.jpg
Rome9.jpg
Rome10.jpg
Rome11.jpg
Rome12.jpg
Rome13.jpg
Rome14.jpg
Rome15.jpg
Rome16.jpg
Rome17.jpg
Rome18.jpg
Rome19.jpg
Rome20.jpg
Rome21.jpg
Rome22.jpg
Rome100.jpg
Rome102.jpg
Rome102.jpg
Rome103.jpg

Then you burn the album to a DVD or Copy to a USB, to watch the slide show on your television and something goes wrong. The photos are not displayed in the same order as when you viewed them on the computer. What happened?

This is the order they get played in:

Rome1.jpg
Rome10.jpg
Rome100.jpg
Rome101.jpg
Rome102.jpg
Rome11.jpg
Rome12.jpg
Rome13.jpg
Rome14.jpg
Rome15.jpg
Rome15.jpg
Rome16.jpg
Rome17.jpg
Rome18.jpg
Rome19.jpg
Rome2.jpg
Rome20.jpg
Rome21.jpg
Rome22.jpg
Rome3.jpg
Rome4.jpg
Rome5.jpg
Rome6.jpg
Rome7.jpg
Rome8.jpg
Rome9.jpg

The Computer Chip in the TV sets sorts numbers by their ASCII value not their Decimal Value.

So if I wanted this list to be sorted in order using ASCII,  I could have used the original file name provided by the camera (IMG_0001.JPG ) or I would have to rename the files.  The key is the Leading Zero's, so all the numbers are the same length.

Rome001.jpg
Rome003.jpg
Rome004.jpg
Rome005.jpg
Rome006.jpg
Rome007.jpg
Rome008.jpg
Rome009.jpg
Rome010.jpg
Rome011.jpg
Rome012.jpg
Rome013.jpg
Rome014.jpg
Rome015.jpg
Rome016.jpg
Rome017.jpg
Rome018.jpg
Rome019.jpg
Rome020.jpg
Rome100.jpg
Rome101.jpg
Rome102.jpg
Rome200.jpg

If the file names are completely different from each other, you can place the Number in front of the file Name:

001_Castle_Rock.jpg
002_Train_Station.jpg
003_Church.jpg
004_Apple Tree.jpg

Placing leading 0's keeps the columns and place values in line. 

This requires renaming each file separately which can take hours.  What I recommend is this:

(1) Create a new sub folder in My Pictures and copy all of the pictures from your camera to this folder.

(2) Edit or Delete any pictures you want, but do not change the file names.

(3) Burn all of the pictures in this folder to a DVD or USB.   When you play the DVD or USB they will play in the order taken using the name the camera provided: IMG_0001.JPG

You can use Windows Explorer to rename all the files at once:  Put all the pictures to be renamed into a folder.  Select all the Pictures (Ctrl+A) and press F2 (rename). On the First Picture enter the New Name:  example    Paris(1).  Make sure you use the (1) or the first picture will be at the end.

Using a Free Special Program to rename:  Bulk Rename Utility is a good free program for renaming pictures.

CAUTION:  DO NOT CHANGE THE FILE NAME EXTENSION, when renaming a file.  The File Name Extension is the file type and can not be changed in this way.   JPG is the file name extension for pictures.

 

HTML5 Valid css - This page last updated on 18 Sep 2017