It doesn't make much sense for a $400/hr attorney to play around with scripts and such or otherwise do much of anything with document production (that is what staff is for).
If an attorney knows coding from a previous career, it can be helpful in a few cases, but for a non-technical attorney to try to pick up enough coding to do anything useful is a stretch.
A shell script to achieve your ends could be endlessly helpful here.
It is one thing to teach a non-techie lawyer how to "hello world" But getting them to understand file system attributes, permission schemes, file I/O, regular expressions, and so on, is where "learn to code" falls apart in this context.
Just getting a non-technical person to learn how to navigate in Powershell is a near impossibility.