FileHog Storage Analyzer for LabTech

On October 15, 2014, in Projects, Scripting, by Cubert aka (Cube Dweller)

filehog-logo

“Rooting out the Truffles in a dirty filing system”

 

FileHog is a file stating tool that collects file names and paths for all files that meet the search criteria provided.

File Hog allows you to configure search parameters and search drives and folders for files that match filters, attributes, file dates and file sizes. Would you like to know how many files over 10 Mb is on a PC and where? What about all hidden files in the users home directory; or maybe you want all files on the C drive that have the word “Contract” in the name that are also “Zip” files, but only ones over 50 MB. 

Yeap you can do that too…

You can search files by location, last change date, files size, attributes or plain text filter or by using any combination of these filters you can search for files across an drive or folder location.

But wait there’s more…

As on version 1.0.1 you have a Client Tab that allows you to scan the PCs of an entire Client for the same search parameters and see what each computer replies with in the same comfortable view as at the computer level.

Using the Configure Tab to modify the search criteria for this PC and save the configuration, then select the Scan button to start a scan using those settings.

Scans take on average 2 to 5 minutes to complete and will be displayed on the File Viewer Tab. You can monitor the Scripts tab for the completion of the scans and to troubleshoot issues like was my file returned to big for LabTech.

You can export the file list to Excel once scan is completed, the Export to Excel can take some time if you have returned a lot of data. Ten minutes for 5000 records is not unlikely.

LT has limited the file content copy to 2 MB files max. If data fails to show then the most likely cause is the SQL file C:\windows\LTSVC\FileHog\filehog.sql is over 2 MB in size. Re-craft your search by adjusting files sizes and minimum date to reduce the max return on scans.

main-file-view

 

 

configure

 

 

FileHog-fileviewer

 

Get Version 1.0.4

download

#######New in Version 1.0.2##########

Added computers reporting in count to Client view
Fixed issue where default size limit was set to 4mb
Fixed issue with SQL file having csv headers as row 1

######New in Version 1.0.3###########

Added display console to send notifications, information and errors
Fixed SQL Client config table issues
Fixed minor issues

######New in version 1.0.4 ############

Added updated interface.dll
Added minor debugging to error messages
Added extra files to zip.

Tagged with:
 

46 Responses to “FileHog Storage Analyzer for LabTech”

  1. Cubert,

    Looks to be yet another cool plugin. I’ve installed successfully, however when I open an agent and go to the tab, I’m recieving an error message:

    Error -> Object reference not set to an instance of an object.

    I’ve uninstalled and reinstalled with same results. Ideas?

    -jeff

  2. Cubert says:

    Yes, there was a column missing in version 1.0 that caused error. This is now fixed in version 1.0.1

  3. We just released 1.0.2 with several bug fixes and a new feature..

    Enjoy

  4. New version 1.0.3 is now released and available for downloads.

  5. Mark says:

    When I try to use this, I receive an error ‘There is no row at position 0’

    Any thoughts?

  6. Cubert says:

    Is that on the client console or the computer console?

    What is the version # you are on? We did have a table issue with 1.0.2 that cuased that but should be fixed in 1.0.3

  7. Mark says:

    We just found the product, downloaded it here, so it looks like we are on .3

  8. Mike says:

    Cubert,

    Thanks for making this! I’m having trouble getting it working properly. The plugin loads but I receive the error:

    Error -> Object reference not set to an instance of an object.

    Also, if I try to run it, the script calls for a file “FileList.exe” to be downloaded from the LabTech server. Did I miss a download somewhere?

    Mike

  9. Mark and Mike, I will repackage a new download today and send you out notice. I will included the filelist.exe. It should of came with the script XML but I’ve seen where the import of scripts sometimes fails to place file correctly.

    As for the error, I will try to reproduce that and get it resolved for you.

  10. Mark and Mike, We have now updated the package to include an extra copy of the exe needed and added new debugging to the messages to pinpoint any failures to the function being called. We also reviewed all code blocks to make sure nothing was out of wack.

    Import the Scripts XML, Delete the 4 SQL tables “plugin_sw_filehog_xxx” and then using plugin manager update the FileHog plugin to 1.0.4

    This should fix everything, but if scans do not run the make sure that the “filelist.exe” in in the Labtech L drive at “\Transfer\Utilities\filelist.exe”. We added a copy of file to zip download in case the script import fails to create it.

    Let us know if you have any issues.

    Cubert

  11. Mark says:

    Thanks much! I see the readme… very helpful!

    However, I see that you state importing the .xml…. that’s not something I’ve ever done before with any plugin… usually it’s just the .DLL file that gets added. Is there something I am missing there?

    Additionally, when adding the plugin, do we enable the ‘Remote Agent’ box?

  12. Patrick says:

    Hi Cubert,

    I’m running into issues with the plugin, specifically how it showing up twice. I tried uninstalling, reinstalling, checking the SQL databases, deleting the .dll and .xml files, but it’s still showing up. Can you suggest anything else?

  13. Terry Rossi says:

    Hi Cubert – Thanks for the awesome tools. You’re Office 365 User manager is a god send for us.

    I am having problems with 1.0.4 of this plugin. When I click on the FileHog tab at either a client or a computer level I receive these errors.

    Any advise?

    Load Scan Error – Error ->Object reference not set to an instance of an object
    Load Config Error – Error ->Object reference not set to an instance of an object
    Ext Count Error – Error ->Object reference not set to an instance of an object
    FileHog Attrib Error – Error ->Object reference not set to an instance of an object
    Top Error – Error ->Object reference not set to an instance of an object

    After trying to save the config
    FileHog Save Error Error -> There is no row at positon 0

  14. This sounds as if you are missing the SQL tables.

    Can you verify that you have 4 tables in sql for Filehog?

    Tables start with
    “plugin_sw_filehog_”

    If you are missing the SQL tables then the queries for stats fail.

  15. Terry Rossi says:

    The tables are listed in the db.

  16. Lets delete all 4 tables, make sure you have the latest version plugin and update the plugin in the plugin manager with the new dll file.

    This will rebuild the SQL tables and should set everything right for plugin.

    see if that helps and let us know.

  17. Vince Kent says:

    I was receiving error : FileHog Save Error Error -> There is no row at positon 0 so I removed the plugin and deleted the tables. When I load the plugin back in it does not recreate the tables so now I am getting the same error completely as Terry Rossi

  18. Drew says:

    I’m trying to periodically check to make sure all the agents for a client have a particular .dll file. It gets updated and I need to make sure that all the agents installed the update. The dates on the file are not reliable and I need to collect the version of the .dll.
    Can this be added to FileHog?
    Thanks

  19. Rebecca Hethcox says:

    Hey there –
    We’re trying to uninstall the plugin and still have the FileHog tab appearing on the computer management screen. Any instructions for removal?

  20. Elias Leslie says:

    I keep getting the following error when trying to filter based on multiple file names. I even tried the same example that shows next to the Filter: .dl_;.exe;thumb;

    The term ‘.exe’ is not recognized as the name of a cmdlet, function, script fil
    e, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

  21. cubert says:

    Elias, looks like the “;” is causing a SQL issue. I will look in to updating this along with several new features here shortly

  22. Bryan says:

    May I ask why you chose to do bytes and could you add an options for KB/MB/GB for making things a bit quicker as well? Keep up the good work!

  23. Jason Richmond says:

    Thanks for sharing these awesome tools.
    I’ve installed FileHog 1.0.4.0
    The tables get created.
    When I attempt to save a configuration, I get the “Error – > There is no row at position 0” error.

    I’ve deleted the 4 tables, removed the plugin, re-added the plugin and it does indeed recreate the tables. But the same error occurs again.

  24. Jason Richmond says:

    Got it – I needed to import the script XML file.
    oops!

  25. Timbo says:

    Was hoping to use this tool to determine the size of everyone’s “Documents” folder to plan for implementing redirection to server. Of course using the %userprofile% variable would not come back with anything, any other ideas?

  26. Charlie says:

    I’ve installed the plugin but I can’t see any additional tabs when I open an agent. I can see the script and the .exe is in the transfer\utilities folder but no way to actually use it?

  27. when you re install and enable the plugin you should always restart the LT Database agent on LT server. This will cause the system to see new plugin and load any new tables that may be missing.

  28. Charlie says:

    Hi Cubert, we have the plugin working but have found that variables such as %temp% or %username% don’t work when supplied as a path. Is this by design?

  29. Megan says:

    We’re liking the tools you’ve provided here – pretty cool! When searching for files, I’m trying to figure out a way to search on workstations only, no servers, at a client. Additionally, am I correct in assuming that the “_” is your wildcard? I’m used to “*”, but just want to be sure. For example, searching for testing*.doc or testing_.doc?

  30. Grant says:

    Hey Cubert,

    This is working great for me – however is it possible for an update to select the path for the exported .xlsx file? Having this export by default in to C:\Windows\LTSvc\filehog is causing some issues for my users – especially those who don’t have local admin on their machines.

    Cheers!
    Grant

  31. Eric says:

    Did everything the way I believe it should be added… added plugin, imported script, reloaded plugins and restarted labtech itself several times.

    Still getting stuck when it’s trying to transfer filelist.exe as it doesn’t exist on the server for transfer. How can I get that?

  32. Derek says:

    Cubert, this looks awesome. I’ve tried installing it several times and from t he LT server itself and keep getting this error.

    There was an error uploading the new plugin

    Am I doing something wrong? I’ve uploaded plugins before.

    Thanks in advance

  33. I get the same thing. This is with LT 10.5.

    — Ken

  34. That’s with FileHog, BTW, I thought I was posting to that thread.

  35. David says:

    Will this work with LabTech 10.5? When I go to add the plugin it says: “There was an error uploading the new plugin”

    Thank you for your help.

  36. cubert says:

    Yes, it will. You need to unlock the DLL first. Rightclick DLL and select properties. click or check the unblock box in properties. Close and reopen LT console and retry install. Will go right through.

  37. David says:

    That worked!

    Thank you for the quick reply.

    When I save a search configuration or click scan on the File Viewer tab I get:

    “Error- > There is no row at position 0.”

  38. David says:

    *Smacks forehead*

    Importing the scripts helps a lot. HAHH

    Looks like it is working as it should. Thank you for making this awesome plugin!

  39. Aaron Liebensfeld says:

    The download version on http://www.plugins4labtech.com/ appears to be 1.0.3

  40. Aaron says:

    The filelist.exe isn’t appearing when doing the XML script import.
    The ZIP available does not contain it either.
    We’ve tried it from the LT server itself (cloud partner) as well as tech workstation.
    Database restart, plugin reload / reinstall doesn’t seem to affect.
    Any advice? I would imagine getting the 1.0.4 ZIP online might do the trick.
    Thank you for all your amazing plugins!

  41. Cubert says:

    Sorry about that, We switched it over to P4L site and had a old build still listed. We have now updated the downloader to build 1.0.4

  42. Josh says:

    Just got this installed, looks handy but setup and use instructions are limited so still getting the hang of it. Trying to figure out how I can filter out certain file types (sys, ost, etc) globally. The configure seems to be per client or per system only as well. I was able to filter to 1 GB globally by editing the script at least.

    Some feedback: Reading everything in bytes is already proving a hassle, at defaulting to at least MB would be a huge help.

    Having an issue tho where if I try to export the results, it crashes the whole control center. (Labtech 11, Patch 5, Plugin version 1.04)

  43. Josh says:

    Actually, seems that crash is only when I run it directly on the server which is Windows 2012 R2 Datacenter. Windows 10 is working fine.

  44. Tyler Noble says:

    Is this working on current builds?
    I don’t get any results, no errors.
    shows scanning computers with no output

  45. Tyler Noble says:

    Does filehog support variables, such as
    %AppData%
    or C:\Users\%userprofile%\AppData\Roaming

  46. DiddlySquat says:

    First off, I used this years ago (along with RegHog and it was great!).
    I’ve tried to revive it. I’ve completely remove/readded the plugin, deleted the tables and I’m only getting 1 error now when opening the Client plugin:
    Error- > Conversion from string “” to type ‘Date’ is not valid.

    I’m on 1.04 and get this in the status window:

    —–
    Saving search parameters…
    Starting search…
    At the following location(s) C:\iso
    Searching…
    Computer1
    Computer2
    Refreshing views…
    —–

    But nothing shows in the list. I can’t see any scripts running against the endpoint and the .exe exists in the Utilities directory.

    I’d love to get this running again 🙂

Leave a Reply