ls -Filter -Recurse not detecting all files

When I do a ls -Filter on the root directory to find python.exe, I only get 1 result.

ls  -Filter "python.exe" -Recurse -ErrorAction ignore Directory: C:Users[redacted]Downloadspython-3.7.1-embed-amd64 Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- [redacted] 99992 python.exe 

However, there exists a python.exe in another user’s folder:

ls Users[redacted2]AppData -Filter "python.exe" -Recurse Directory: C:Users[redacted2]AppDataLocalProgramsPythonPython37 Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- [redacted] 99992 python.exe 

How am I not getting both results in the first search? I even tried -F “*python.exe*”

The same happens if I use -include instead of -Filter. Shouldn’t it include both results because it’s at the root directory? What the fuck is going on here?

submitted by /u/PhisherPrice
[link] [comments]

Leave a Reply