Search windows folders for any subfolders with a filename only 3 characters long

0

I've been reading some previously asked questions which seemed to relate to mine, but they didn't solve my specific problem.

At the company I work for, we mostly use three character file names for each of our folders containing projects (usually 3 letters), and the problem that's arisen is some of those project folders have accidentally been moved into others. We'd like to be able to quickly find any subfolders within other folders that only contain 3 character filenames so that we can separate the projects.

For example, say you had some folders called "SAT", "SAC", "THK" and "TIL". SAC was accidentally moved into SAT, and THK into TIL. How would I go about finding both of those moved folders in one search? Is it possible?

Japidoo

Posted 2018-04-05T14:20:24.240

Reputation: 3

Answers

0

You could use Powershell:

Get-ChildItem -Recurse -Directory | Where-Object{$_.Name.Length -eq 3} | Select-Object FullName

EBGreen

Posted 2018-04-05T14:20:24.240

Reputation: 7 834

How would I point this code to search within a specific network attached directory? – Japidoo – 2018-04-06T09:18:46.267

You would specify the path of the directory when you called Get-ChildItem. – EBGreen – 2018-04-06T13:35:32.630

Thank you for your quick responses! This was the answer I've been looking for. – Japidoo – 2018-04-11T08:50:04.933