Client Management Suite

 View Only

Find a Specific File Type and the Amount of Space It Is Using 

Feb 02, 2011 04:07 PM

This uses the NS7 Inventory Solutions tables.

We recently needed to scan our environment for media files that weren't necessarily allowed, at the same time we decided to determine how much data they were using. So I wrote this SQL query to populate this information, I will build it into a flexible report soon to follow this article. This will take the table which is read in KB and move it to MB for easier relation, it also filters based on primary user / month. This way we can make sure that the data is as close to up to date as possible..

Select t0.[Name] as 'Computer Name',
t1.[User] as 'Primary User',
t2.[File Type] as 'File Type',
t2.[Total Files Reported] as 'File Count',
t2.[Total File Sizes (Kilobytes)]/1024 as 'Space Used'
from vComputer t0
INNER JOIN Inv_AeX_AC_Primary_User t1 ON t0.[GUID]=t1.[_ResourceGuid]
INNER JOIN Inv_SW_Disk_Usage_By_File_Type t2 ON t1.[_ResourceGuid]=t2.[_ResourceGuid]
WHERE t1.[Month] = 'January'
AND t2.[File Type] = 'mp3'
ORDER BY 4 DESC
 
I'll attach the report soon enough.... hope you guys enjoy it.

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Feb 03, 2011 08:30 AM

 

I have this report created, the difference is that group by equipment and is filtered by extension.
must create the view, attached the two files (Report and view)
I hope to serve you

Related Entries and Links

No Related Resource entered.