for k in {794..800}
if [ -f "vesta_$k.xyz" ]
then
do
mkdir $k
mv vesta_$k.xyz $k/vesta.xyz
cd $k/
<<COMMANDS>>
cd ..
done
fi
PS vesta_$k.xyz is a sequence of files. The problem is at the first line of the IF command.
if [ -f "vesta_$k.xyz" ];
;
when there is a line break.