I have a lot of directories; a lot of them have just 1 file or 2 in them.

I want to copy the directories which have more than 2 files in them in another directory, how can I check it and move the directories?

I have come so far with the script but I'm not sure of it.

```
#!/bin/bash

mkdir "subset"
for dir in *; do
        #if the file is a directory
        if [ -d "$dir" ]; then
            #count number of files
            count=$(find "$dir" -type f | wc -l)
            #if count>=2 then move
            if [ "$count" -ge 2 ]; then
                #move dir
                #   ...
            fi
        fi
done

```

The command `mv $dir ..` moves the directory up of one, but is it possible to move up of one and down in `subset` without using complete path `mv $dir complete_path/subset`?