thanks for help me i already find a command working for me

for f in *; do rar a -s -m0 "$f.rar" "$f"; done

splits sub directories and rar with its original subfolder name