I'm trying to write a script that will put files with different extensions into their specified directories .
In the directory are files of various types, i want to arrange the files on individual directories under their type. There are three distinct types of files:
- Text documents - files with extensions. Doc,. Txt,. Pdf, ...
- multimedia files - with the extensions. Mpg,. Avi,. Mp3 ...
- graphics files - with the extensions. Jpg,. Gif,. Png ...
- All other files
Files types 1-3 to move into individual directories and files of other types have to move in directories with names corresponding to the extension (you can bring them to uppercase - BAK, CPP ,...).
i want the script to run with the following parameters:
- -m path - if specified, the multimedia files will be moved to the directory PATH
- -d PATH - specifies the path where you have to move your documents
- -l indicates that when the file names should lead to lower case
- -x indicates that they move to lower case file extension
any ideas?? I am a newbie and I'm trying to learn bash scripting so I thought of this question