#!/bin/bash
CWD='pwd'
clear
echo "Starting..."
cd /home/glen/downloads
ls -l
for directory in /home/glen/downloads
do
for file in directory
do
if [ "${file}" == "*.mp3" ] || [ "${file}" == "*.flac"]
then
cp directory /home/glen/Music
else if [ "${file}" == "*.avi" ]||[ "${file}" == "*.mkv" ]||[ "${file}" == "*.mp4" ]
then
cp directory /media/sdb/Videos
fi
echo "Finished!"
cd $CWD
done
If anyone could point me in the right direction I would be very grateful!

New Topic/Question
Reply



MultiQuote



|