I want to do a script for linux that copy several files with same extension but different names into another directory with the same folders as files i want to copy and with the same name as the files, and these files, one by one, within their folder.

Example, i have this:

```
Directory X -
             abcd.zip
             cdab.zip
             adcb.zip
             ...

```

And with the copy i want to be like this:

```
Directory Y -
             abcd -
                   abcd.zip
             cdab -
                   cdba.zip
             adcb -
                   adcb.zip
             ...  -
                   ...

```

I don't know if i have explained well, sorry.

Thanks in advance.

SOLVED. I use this:

```
cd x

for file in *.zip; do
name="${file%.*}";
mkdir -p $name;
cp $file $name;
done
rm *.zip

cd ..

rsync x/* y

```