Hi guys,
I have a number of files within a directory which are named Log-2014-01-21.txt and similar. What I’m trying to do is write a program that will archive these files based on the month that is in the file name rather than the file Info. The part I’m struggling with is getting the date out of the string which will work for different string lengths i.e if the file was called error-log-2014-11-11.txt. Is there a nice way of doing a string spilt to accomplish this, or another method?
Kind Regards