Powershell script to generate HTML report on files by size, folder, extension...

13 July 2016 - v1.3 Added MaxFileSize parameter, updated Log function11/03/2014 - v1.2 Added 'Report run time' at the bottom Fixed bug when no files are found that match criteria Turned into function Bundled with EnhancvedHTML2 Added SizeUnit parameter

4.8 Star
4,693 times
Add to favorites
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question

  • It is possible to add File Owner
    1 Posts | Last post January 09, 2019
    • Hi Sam,
      Thanks for the uploading the script and sharing with everyone. I ran the script and the report ticks all the boxes with regards to what I needed. 
      I was wondering if it is possible to add the File Owner too?
  • Pass it a txt file of foldertargets
    1 Posts | Last post August 03, 2018
    • Is it possible to replace the -FolderTargets with a Get from txt file  ? 
      Or I have multiple Intrays to monitor that are structured as 
      I tried \Inbound\*\Import\Intray but it didnt search all trays 
  • Cant get it to run
    2 Posts | Last post August 03, 2018
    • This looks to be exactly what I need but having tested on two different systems 
      I cant get it to work 
      I have downloaded it, imported it even ran the help on it but I can't seem to get anything to return 
      Is there anything inside the script that also needs editing ?
    • Somehow got it working 
      I think once imported I could call it just as Report-OnFile 
      Didnt need the ./ or the ps1 before or after 
  • Change times to european readable time format
    1 Posts | Last post June 21, 2018
    • Currently reports are shown in the following format: 
      MM/dd/yyyy HH:mm:ss (06/15/2018 15:08:29)
      I want to change the results at creationtime in the html table to:
      dd.MM.yyyy HH:mm:ss (15.06.2018 15:08:29)
      Is this possible? I can easily modify the values for report runtime but with HTML-Conversion i cant. 
  • Sorting
    2 Posts | Last post June 15, 2017
    • Is it possible to add a feature that allows the report to be sorted on one or multiple properties?
    • Never mind. I RTFM.
  • Modification?
    2 Posts | Last post July 13, 2016
    • Hey, great script I've used it a few times now.
      One suggestion to for a feature I'd suggest would be to allow there to be a MaxFileSize parameter. Mainly it would be nice to use this with the MinFileSize parameter.
      -MinFileSize 25 -MaxFileSize 50 -SizeUnit "KB"
    • v 1.3 added MaxFileSize
  • Path too long
    1 Posts | Last post July 13, 2016
    • Hi, great script, thanks for that.
      I got some problems because filepath/name longer than 260 characters. Are you able to change your script to COM-Object? I thinkt with that, the issue should be solved. Also is there a way to search for extensions e.g. .doc,.docx etc. at once and not one by one?
      Great thanks for your help
  • No output
    2 Posts | Last post May 16, 2016
    • Hello,
      This script does not function. I have tried following your examples and nothing, no output in the log or report.
      Thanks, Kstr79
    • In order to run the script, you must first import the modules of that script.
      Run the following:
      Import-Module <ps1 location>\Report-onFiles.ps1
           example: Import-Module C:\Temp\Report-onFiles.ps1
      Then you should be able to run the actual script with all of your parameters.
      .\Report-onFiles -TargetFolders "C:\Sandbox" -FileTypes txt,cs* -Properties "Name","DirectoryName","Extension","Length","LastAccessTime" -MinFileSize 1KB
  • No Response
    1 Posts | Last post March 26, 2015
    • Sam,
      This looks like a great, very involved script, but my test gave me no output. Here's what I did. I created a folder called example and dumped some Excel files in it.
      I ran your script as such:
      report-onfiles.ps1 -Targetfolders "c:\example" -Filetypes xls or I even simply ran it without filetypes.
      I get no error, no response, no output, no report; just back to the powershell prompt.
      By the way, how DO you get a report, how is the HTML report generated and where does it go or how do you indicate where it should go?  I'm missing that in your detailed help.
      I'm new at this so I appreciated your help.