Script to sort video files into different folders
I have a downloads folder that gets many different files from different sources (mostly videos) I am also using XBMC as my Media Center I am trying to create a script that will move all related files to the same folder.
Ex. ~/Videos folder may contain a file called My.Show.s04e06.mkv in the same folder there may be another file called myshows04e07.avi I would like both of the above files to go to a folder called ~/Videos/Shows/MyShow so that it will be easy to find in XBMC I have been using Bash and various combinations of ls, find, and mv commands but I cant seem to get it it to work. I am fairly new to Linux but I do have some basic knowledge of scripting and programming so I am just looking for someone to point me in the right direction. Thanks |
Code:
#!/bin/sh -- |
All times are GMT -5. The time now is 05:30 PM. |