shell script to make dirs and move files
Posted on 2000-05-15
I have a little program that generates different reports based on dates....and each file is tagged with a date and it stores the files in different directories.....
eg it generates these files...
and puts the files to corresponding directories....
eg all attendance records in a directory called attandance and student marks in a directory called student-marks...
you can assume that there will be any number of directories with different names....
I need a little shell script...that goes to each directory...and checks the date tag of each file....then creates a directory if it does not exist in the root level (ie top) directory...and moves the file with that date tag to the date directory....
in the example above we should get 3 date directories...
then in the directory
02-03-2000 we should move these file
in directory 03-04-2000 we should move
and in directory 04-05-2000 we should move