for x in *.JPG; do
if [ ! -e current/$x ]; then
I can't see anything wrong with this in particular, one thing that springs to mind is to quote the string that you are testing:
for x in *.JPG; do
if [ ! -e "current/$x" ]; then
Hope that helps
for x in *.JPG; do
if [ ! -e current/$x ]; then