Linux script to evaluate .txt files by month/year and move to another folder.
Posted on 2012-04-05
I hope there is a way to accomplish this task. I have several .txt files that I need to move to another folder that contains folders by year, i.e. "2011", "2012", etc. The problem is that we run on a fiscal calendar that does not coincide with the regular calendar. I want to run a simple script that can scan the month and year of each file and move the file to the appropriate year's folder. The fiscal calendar runs February 1st through January 31st, how do I compare the file's month/year to the fiscal calendar to ensure the files are placed properly?