I have an FTP process that is constantly putting files into a directory. The date created is part of the filename in a format like this:
YYYY-MM-DD-HH-MM-SS-xxxxxxxxxx.wav
I would like to move the files to another directory based on the date the file was created. I can use either the filename or the date stamp, whichever is easier. Only the month and year needs to be considered. I have created directories using the following format:
Jan_2016 Feb_2016 I have been creating directories and moving the files manually but I would like to automate this with a bash script that will create the directory if it does not exist.
What I have been doing so far is manually creating the directories and then running this command:
mv ./2016-02*.wav Feb_2016/
I don't have any scripting experience and I'm sure this is very easy to someone who does.
Appreciate any input on this.