Reporting on mp3 files in 1 share
I am looking for setup a report that will be saved every day from a scan so I can monitor files on the network. The scan will run through a specific share on the network for mp3 files, I then need it to report the file name plus directory listing to a text or csv file to read. Can this be done easily?
November 8th, 2011 9:39am

$path = "\\server\share" $filetype = "*.mp3" $CSV = "C:\mp3files.csv" Get-ChildItem -Path $Path -Include $Filetype -Recurse | Select DirectoryName,Name | Export-Csv $CSV -NoTypeInformation This PowerShell script should be able to do what you are looking for. It will scan the share in the $Path variable for files of type $Filetype and then output the directory and filename to a csv file at $CSV.Rich Prescott | Infrastructure Architect, Windows Engineer and PowerShell blogger | MCITP, MCTS, MCP Engineering Efficiency @Rich_Prescott Client System Administration tool AD User Creation tool
Free Windows Admin Tool Kit Click here and download it now
November 8th, 2011 9:47am

Excellent thanks for that, im not too familiar with powershell. Can I automate it into a single script/executeable file?
November 8th, 2011 10:11am

was searchi for this trick for a looooong day ! tx :)
Free Windows Admin Tool Kit Click here and download it now
November 8th, 2011 1:08pm

Yes. Copy and paste the code from above into a .ps1 file and save it. You can then right-click and 'Run with PowerShell', as long as PowerShell is installed.Rich Prescott | Infrastructure Architect, Windows Engineer and PowerShell blogger | MCITP, MCTS, MCP Engineering Efficiency @Rich_Prescott Client System Administration tool AD User Creation tool
November 8th, 2011 1:23pm

Thanks, I added it to the server and created a batch file to run the ps1 file. Also added it to a scheduled task to run every month :) Thanks for your help mate!!!
Free Windows Admin Tool Kit Click here and download it now
November 9th, 2011 4:03am

Quick one, how do you add multiple file types to the search?
November 10th, 2011 10:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics