Page 1 of 1

Script for Moving Files

Posted: September 10th, 2008, 3:04 pm
by Rengoku
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:

Code: Select all

FOLDER_PATH="$1"

if [ $CATEGORY_NAME = "Upload" ]
then

FILEZ[1]="$FOLDER_PATH`find . -regex '.*/.*\.avi'"

mv "${FILEZ[1]}" "/Upload/"

fi
Do I need a for loop to go through all files in the folder or something? Any help would be much appreciated!

Re: Script for Moving Files

Posted: September 10th, 2008, 10:53 pm
by Rengoku
Nevermind, I was not aware that I could run dos scripts as well after post-processing. Anyways, problem solved.