I have a ftp server that people upload files to in /home/username.
I need a bash script to move files from their home directory to the correct directory.
I will be adding future users so the script must recognize new user folders as they appear.
Under each user directory we have the following folders
So the script should look at all the folders in /home and make a list of the usernames then move them according to this for each username
mv /home/username/normalvideo/*.* /home/smartdata/www/html/files/encode/mp4
mv /home/username/widescreen16x9/*.* /home/smartdata/www/html/files/encode/mp4
mv /home/username/widescreen3x2//*.* /home/smartdata/www/html/files/encode/mp4
mv /home/username/audio/*.* /home/smartdata/files/www/html/encode/mp3
mv /home/username/podcastvideo/*.* /home/smartdata/files/www/html/encode/m4v
Thanks in advance!