Ok, I have this script that I have been practicing with. What it does, is simply looks in my downloads folder and looks for (*.filetype)
Then, it will distribute each file type to specific destinations ie. html to Documents, or mp3 to Music etc.
The script works, but I still get errors such as:
mv: cannot stat `/Downloads': No such file or directory
If no file types exist I get similar errors in the shell, but if they do, they are sent to the destination directory, but I still get the above error in the quote.
Here is the script:
if [[ $1 != 0 ]]
cd /home/dude/Downloads && mv *.pdf /Downloads /home/dude/Documents;
mv *.mp3 /Downloads /home/dude/Music;
mv *.html /Downloads /home/dude/Documents;
echo "No such file types exist in this directory"