In the shared folder, you need to delete the "Templates" folder for each user. It accumulates files that are heavily loaded by the server.

\ file \ file \% username% \ appdata \ romaning \ microsoft \ Templates

how do I implement this in one script or batch file without resorting to the "task scheduler"

    2 answers 2

    cd \file\file for /d %d in (*.*) do ( cd "%d\AppData\Roaming\Microsoft" && rd /s /q "Шаблоны" && md "Шаблоны" cd \file\file ) 

      something like this

       RD /S /Q "C:\Users\%username%\AppData\Roaming\Microsoft\Шаблоны" 
      • so delete only in one directory - Keeplod
      • every user, I know a little not read the question - Yaroslav