Removing Files and Folders via Script

From time to time I need to remove files and/or folders from computers at work.  I don’t remember where I got this script but I thought I would share as it has worked wonders for me.

@echo off
IF EXIST “C:\Users\” PUSHD “C:\Users\”

FOR /F “tokens=*” %%G in (‘dir /a:d-s-h /b’) do (
IF EXIST “%%G\AppData\Roaming\FOLDER/FILE” rmdir /q /s “%%G\AppData\Roaming\FOLDER/FILE”
)
POPD

Basically, you just need to replace the path with whatever it is you intend to remove and then save it as a .bat file.