Yes, Steve, it does the job I needed, allowing me to pull specific ranges of files.
It also has the added benefit of reporting which files in the range are missing, because it will complain when one is missing:
cp: cannot stat `instruments/132479.pdf': No such file or directory
cp: cannot stat `instruments/132480.pdf': No such file or directory
cp: cannot stat `instruments/132481.pdf': No such file or directory
cp: cannot stat `instruments/132482.pdf': No such file or directory
cp: cannot stat `instruments/132483.pdf': No such file or directory
mkdir destination
for x in /yourfolder/{5000..1000000}*.pdf;
if ! test -e "$x"
then
echo "$x" does not exist
continue;
fi
do cp $x destination;
done;
zip destination;
It's best to always redirect diagnostic messages to stderr, so that when someone runs your script with stderr redirected, the messages are sent to the correct destination.