Script for Moving Files
Posted: September 10th, 2008, 3:04 pm
Sorry, but I'm a real newbie with this. I've tried to read up on as much as I could find on this site, but I can't seem to get my script to work, I'm pretty sure I butchered most of the syntax. I'm trying to move all .avi files in a download folder to a single folder. Heres what I was able to come up with:
Do I need a for loop to go through all files in the folder or something? Any help would be much appreciated!
Code: Select all
FOLDER_PATH="$1"
if [ $CATEGORY_NAME = "Upload" ]
then
FILEZ[1]="$FOLDER_PATH`find . -regex '.*/.*\.avi'"
mv "${FILEZ[1]}" "/Upload/"
fi