The following script seems to be a good one but it will work only if you have "well behaving" filenames :
for f in $(ls -rt) ; do
if [ $((foo%2)) -eq 0 ];
echo "even " "$f"; // maybe here copy
echo "odd" "$f" ; // maybe here skip
So essentially no newlines, no tab, no spaces... as it seems in your case.
Please remember that is not safe to parse the output of
ls  and doublecheck always.
If you are not in the safe area in which you can use ls, then you may consider to find a solution with
find, maybe taking some inspiration from Gilles' answer .
Ps> In case of data corruption, even in a light case as yours, it always needed to check that the patch worked. Often is more convenient to start again from the beginning. If, as I guess, the data size is huge and you cannot transfer/download it again, it's always possible to do some check (e.g.
md5sum) on the original data and the patched one.