Simple move script
Hi all!
Im trying to setup a download box for myself and along the way learning about or two about linux. So i have made a script (cover your eyes, its extremely advanced) that looks like this: Code:
zenity --info --text="Copy of files initiated, please wait until done" Anyone have an idea on how to make it "look" before trying to copy? Thanks in advance! (Thanks for a great forum as well!) Ravedog EDIT: Spell check :/ |
how about:
Code:
ls /home/user/downloaded/*DVD* >> /dev/null |
Thanks for a quick answer m8! Ill get right on testing it in the morning :)
|
Worked like a charm! Thanks!
Follow up question, what is the syntax in the example given above if i like to search for several thing? I.e. *DVD* and *DVDrip* and if any match proceed. Thanks guys! |
If you want to perform an action on any file found, you can use a for loop like this:
Code:
for file in $(ls *DVD* *DVDrip* 2>/dev/null) |
Hi colucix!
Thanks for the tip! I want to scan a download folder after several criteria and move them to the correct folder. Simple put: If DVD --> Folder a If 1080 or 720 --> Folder c If xvid -> Folder b Cheers! /R |
You can try a case/esac construct:
Code:
for file in /home/user/downloaded/* |
That looks really sweet, gonna try it out in the morning! thanks a bunch man! :)
Cheers! /R |
All times are GMT -5. The time now is 03:55 AM. |