Hello,
Summary
Folder A
- Folder B
- Folder 1
- Folder a
- Folder C
- Folder 2
- Folder D
- Folder E
Looking for a report that looks through all subfolders of A for Modified dates greater than 90 days old but returns Folder B-E and not 1,2, or a if it meets the criteria so I can delete the content.
Long winded post below.
We are using 9.7.1 and I'm trying to create a report that will return a list of immediate subfolders that have not had any changes within the previous 90 days for deletion. I at first thought I had it by looking at just the modified date of the subfolders, but realized that if they contain additional folders and changes are made there, the main subfolder date does not get altered. I could go the other way if easier and list of folders that have activity in the previous 90 so don't delete them.
My first shot at the report was the following
Select DTree.DataID, DTree.ModifyDate, Dtree.Name,
FROM DTree INNER JOIN DTreeAncestors ON DTree.DataID = DTreeAncestors.DataID
WHERE DTreeAncestors.AncestorID = 1234 AND ModifyDate < SysDate - 90 AND DTree.Subtype = 0
ORDER BY DTree.ModifyDate
but that will give me a list of any folder and then I have to dig around trying to find the top level folder. I also ran into a strange problem where one of my main subfolders doesn't show up in the DTreeAncestors table at all. Rather odd.
Thanks for any help.
B
Summary
Folder A
- Folder B
- Folder 1
- Folder a
- Folder C
- Folder 2
- Folder D
- Folder E
Looking for a report that looks through all subfolders of A for Modified dates greater than 90 days old but returns Folder B-E and not 1,2, or a if it meets the criteria so I can delete the content.
Long winded post below.
We are using 9.7.1 and I'm trying to create a report that will return a list of immediate subfolders that have not had any changes within the previous 90 days for deletion. I at first thought I had it by looking at just the modified date of the subfolders, but realized that if they contain additional folders and changes are made there, the main subfolder date does not get altered. I could go the other way if easier and list of folders that have activity in the previous 90 so don't delete them.
My first shot at the report was the following
Select DTree.DataID, DTree.ModifyDate, Dtree.Name,
FROM DTree INNER JOIN DTreeAncestors ON DTree.DataID = DTreeAncestors.DataID
WHERE DTreeAncestors.AncestorID = 1234 AND ModifyDate < SysDate - 90 AND DTree.Subtype = 0
ORDER BY DTree.ModifyDate
but that will give me a list of any folder and then I have to dig around trying to find the top level folder. I also ran into a strange problem where one of my main subfolders doesn't show up in the DTreeAncestors table at all. Rather odd.
Thanks for any help.
B