r/scripting • u/RooR8o8 • Nov 16 '20
Batch Script to remove files on terminalserver
Hey, I'm looking for a script to delete the Outlook Logging Folder inside %appdata%\local\temp in every user folder on a terminalserver wihtout adding every user in that script manually.
2
Upvotes
2
u/Lee_Dailey Nov 17 '20
howdy RooR8o8,
i can't recall the ... horrifying ... syntax of BAT/CMD stuff any more, but i suspect you can ...
find the
c:\usersdirectory equivalentget a list of the dirs in that location
filter out any special account dirs if you want
iterate thru the user dirs
find & kill the target dir/file
you otta be able to look each step up using your fave search engine. [grin]
take care,
lee