Hi all,
I've just been given a requirement to automate some folder deletion on a windows box. I'm more of a Unix person so my windows scripting skills are a little weak so I thought i'd ask here.
I'll have a folder that will have a set of subfolders which I need to read the names of, under those folders will be another series of folders named using YYMM for the folder name.
if the high level folder is called recording then this is what I need to do,
List 1st level subfolders of recording, for each of the folders found get the current YYMM values (this will always run on the 1st of the month) and then delete any subfolders that are older than 3 months.
So if the current YYMM value was 1102 I would want to keep 1101, 1012 and 1011 and delete anything else.
Hope someone can help me on this,
Thanks.
I've just been given a requirement to automate some folder deletion on a windows box. I'm more of a Unix person so my windows scripting skills are a little weak so I thought i'd ask here.
I'll have a folder that will have a set of subfolders which I need to read the names of, under those folders will be another series of folders named using YYMM for the folder name.
if the high level folder is called recording then this is what I need to do,
List 1st level subfolders of recording, for each of the folders found get the current YYMM values (this will always run on the 1st of the month) and then delete any subfolders that are older than 3 months.
So if the current YYMM value was 1102 I would want to keep 1101, 1012 and 1011 and delete anything else.
Hope someone can help me on this,
Thanks.