netslt
asked on
File inventory of network share
Hi,
With what tool(s) can I make an inventory of files on a network share and export the list (CSV, Excel, XML or similar).
Preferrably defineable depth/recursiveness of inventory (1 level deep, 2 level, infinite etc.)
Thank you!
With what tool(s) can I make an inventory of files on a network share and export the list (CSV, Excel, XML or similar).
Preferrably defineable depth/recursiveness of inventory (1 level deep, 2 level, infinite etc.)
Thank you!
Treesize might give you the information you need and you can export the data.
ASKER
Does it really work with network shares?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
With the command line options of the pro version I think it would work, so I accept the answer.
Anyway I decided to write a four liner in Powershell that can do it:
$filename=$args[0]
foreach($line in Get-Content $filename) {
Get-ChildItem -Recurse $line -Filter * | Where { ! $_.PSIsContainer } | Select-Object DirectoryName,Name,Extension,PSDrive,Length,Mode,LastWriteTime | Export-Csv -Delimiter ';' -Path test.csv -Append -Encoding ascii -NoTypeInformation
}
Accepts a command line argument with a file name containing share paths \\server\share on multiple lines:
\\server\share
\\server\share2
\\server2\share1
etc.
Anyway I decided to write a four liner in Powershell that can do it:
$filename=$args[0]
foreach($line in Get-Content $filename) {
Get-ChildItem -Recurse $line -Filter * | Where { ! $_.PSIsContainer } | Select-Object DirectoryName,Name,Extension,PSDrive,Length,Mode,LastWriteTime | Export-Csv -Delimiter ';' -Path test.csv -Append -Encoding ascii -NoTypeInformation
}
Accepts a command line argument with a file name containing share paths \\server\share on multiple lines:
\\server\share
\\server\share2
\\server2\share1
etc.