0

Trying to see my files larger than 500mb inside C:\users

Get-ChildItem C:\users\cata\ -recurse | where-object {$_.length -gt 500mb} | Sort-Object length | ft fullname, length -auto

FullName                                                                                                                                                            
Length
--------                                                                                                                                                            
------
C:\users\cata\Downloads\Masters of Science\Masters of Science Fiction.avi 1204361216

As you can see a little bit below, it doesn't search inside hidden folders like AppData.

However, searching explicit in appdata lists an item which previously hasn't been listed.

Get-ChildItem C:\users\cata\appdata -recurse | where-object {$_.length -gt 500mb} | Sort-Object length | ft fullname, length -auto
FullName                                                                     
Length
--------                                                                     
------
C:\users\cata\appdata\Roaming\tobedeleted\CentOS-6.0-x86_64-bin-DVD1.iso 4238800896

And if I try to search with -force parameter, it says access denied, even though I can manually go inside the appdata directory. Is it possible to force powershell to go inside the hidden directories such as C:\Users\cata\AppData and search for files?

2
  • you wrote However.... then stopped. Your question is incomplete. Can you edit your statement, it is not complete and clearly understandable.
    – ShanayL
    Nov 5, 2017 at 8:16
  • Yea, sorry. I've edited just now.
    – catalin
    Nov 5, 2017 at 9:04

1 Answer 1

1

Try using the -Force parameter from an elevated instance of Powershell. Open PS as an administrator, then use -Force (you may also want to use -ErrorAction SilentlyContinue.

Get-ChildItem C:\users\cata -Recurse -Force -ErrorAction SilentlyContinue
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .