I have a directory with gigabytes (about 8gb) of small individual files. I want to organize them into directories by date. The date it was created is part of the filename.
Here is an example of a filename:
4RCPBlockCoverLtrednalaserfalse07-10-2012-11-50-14-656.doc.gz
I want the docs directory setup like this:
docs_by_date
2013
01
02
03
04
If the destination directory does not exist it should be created. After verification of a successful copy the source file should be removed.
I'm no super guru with bash, a lot of the symbols I still don't know what they mean, so an explanation would be great of what the script is doing.