Randomly move files from /path/to/file with a .jpg extension to the ~/NewLocation directory, renaming them with a .jpg extension.
awk 'BEGIN {print int(rand() * 500)}' | xargs -I {} mv /path/to/file{}.jpg ~/NewLocation{}.jpg