Avatar of netslt
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!
PowershellSystemTools SoftwareWindows NetworkingNetworking

Avatar of undefined
Last Comment
netslt
Avatar of Hello There
Hello There

Treesize might give you the information you need and you can export the data.

Avatar of netslt
netslt

ASKER

Does it really work with network shares?

ASKER CERTIFIED SOLUTION
Avatar of Hello There
Hello There

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of netslt
netslt

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.


Networking
Networking

Networking is the process of connecting computing devices, peripherals and terminals together through a system that uses wiring, cabling or radio waves that enable their users to communicate, share information and interact over distances. Often associated are issues regarding operating systems, hardware and equipment, cloud and virtual networking, protocols, architecture, storage and management.

102K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo