troubleshooting Question

How to find out all files and their appropriate paths on drive using powershell?

Avatar of davidzak
davidzak asked on
Programming
6 Comments1 Solution314 ViewsLast Modified:
Hi All,

Just need PS script which will display me all files and their paths in second column for example on some hard drive.
Lets say that I have "C:\" hard drive and i'm interesting to see all files with their paths.

I find out this code:

$Path = "d:\backups"
$a = get-Childitem $Path -recurse | format-table -group{$_.Path} name, directory -autosize
$a

but it works only for backups folder, when I replace it to "d:\" it doesn't work I get message: WARNING: column "directory" does not fit into the display and was removed.

So folks, what I'm doing wrong?

Thanks for answer in advice.

Best Regards.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros