Make sure to cd
into the directory with subfolders containing photos, for example:
#> λ ~/ cd Desktop/test
#> λ ~/Desktop/test/ ls
#> 100003 100004
Where 100003 and 100004 are folders that contain photos. If the folders don't exist and you need to rename photos based on the file name, see this unix solution or this windows solution.