pi@retropie:~/.emulationstation/scripts/quit $ for filepath in $(find $LOCALPATH -name *.srm); do dir=$(echo $filepath | awk -F'/' '{print $(NF-1)}'); echo cp -v $filepath $BACKUPPATH/$dir/$(basename $filepath); done; cp -v /home/pi/RetroPie/roms/n64/Super /mnt/megabyte/Retro Games/Roms//n64/Super cp -v Mario /mnt/megabyte/Retro Games/Roms//Mario/Mario cp -v 64 /mnt/megabyte/Retro Games/Roms//64/64 cp -v (USA).srm /mnt/megabyte/Retro Games/Roms//(USA).srm/(USA).srm cp -v /home/pi/RetroPie/roms/n64/Mario /mnt/megabyte/Retro Games/Roms//n64/Mario cp -v Kart /mnt/megabyte/Retro Games/Roms//Kart/Kart cp -v 64 /mnt/megabyte/Retro Games/Roms//64/64 cp -v (E) /mnt/megabyte/Retro Games/Roms//(E)/(E) cp -v (V1.1) /mnt/megabyte/Retro Games/Roms//(V1.1)/(V1.1) cp -v [!].srm /mnt/megabyte/Retro Games/Roms//[!].srm/[!].srm cp -v /home/pi/RetroPie/roms/n64/Yoshi's /mnt/megabyte/Retro Games/Roms//n64/Yoshi's cp -v Story /mnt/megabyte/Retro Games/Roms//Story/Story cp -v (USA) /mnt/megabyte/Retro Games/Roms//(USA)/(USA) cp -v (En,Ja).srm /mnt/megabyte/Retro Games/Roms//(En,Ja).srm/(En,Ja).srm cp -v /home/pi/RetroPie/roms/snes/Super /mnt/megabyte/Retro Games/Roms//snes/Super cp -v Mario /mnt/megabyte/Retro Games/Roms//Mario/Mario cp -v World /mnt/megabyte/Retro Games/Roms//World/World cp -v (USA).srm /mnt/megabyte/Retro Games/Roms//(USA).srm/(USA).srm cp -v /home/pi/RetroPie/roms/snes/Super /mnt/megabyte/Retro Games/Roms//snes/Super cp -v Mario /mnt/megabyte/Retro Games/Roms//Mario/Mario cp -v All-Stars /mnt/megabyte/Retro Games/Roms//All-Stars/All-Stars cp -v + /mnt/megabyte/Retro Games/Roms//+/+ cp -v Super /mnt/megabyte/Retro Games/Roms//Super/Super cp -v Mario /mnt/megabyte/Retro Games/Roms//Mario/Mario cp -v World /mnt/megabyte/Retro Games/Roms//World/World cp -v (USA).srm /mnt/megabyte/Retro Games/Roms//(USA).srm/(USA).srm