79235426

Date: 2024-11-28 22:30:34
Score: 7.5 🚩
Natty:
Report link

Compo, your code works perfectly:

@For /F "Skip=50 EOL=? Delims=" %%G In ('Dir "C:\Images" /A:-D /B /O:-D /T:W 2^>NUL') Do @Del "C:\Images\%%G" /A /F

Do you have any suggestions on how to apply this same method to the contents of multiple folders?

I made a sample folder structure:

enter image description here

Or should I just create a different batch file and run automatically for each subfolder?

Thank you very much for your help.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • RegEx Blacklisted phrase (2): any suggestions
  • RegEx Blacklisted phrase (2.5): Do you have any
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: S.Zs.94