Moving files only by oldest file one at a time

Hi

I am want to create a script where the file gets moved from the current folder to a folder transfer based on the oldest first. This script should run one file at a time using a loop. I want it as a loop because I want to do some processing while I have one file. Can anyone guide me on this?

How about something like this :

ls -rt | while read file
do
    if [ -f "$file" ]
    then
        # Process file HERE
        mv "$file" ./transfer
    fi
done

Exactly what I needed

Thanks