You want to rewrite an old batch file (.bat) into PowerShell. If you ask an AI, it will generate a plausible script in a few minutes.However, after rewriting, it often happens that "it runs, but the ...
I only want to keep the newest, say, 4 of each of the files. I can't write a script that just deletes anything older than a certain time from when it runs, as the files don't have consistent ...