[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 640
  • Last Modified:

GPO to delete files from a local PC folder

Hello, I cant seem to find what I am trying to acheive (it may not be possible) I have a line of business application that creates temporary files on the local PC on my SBS 2011 network. Previously on SBS 2003 I had a login script run that would delete these temporary files.

I am trying to replicate this function using a GPO is this possible?
0
infradatel
Asked:
infradatel
  • 3
  • 3
1 Solution
 
infradatelAuthor Commented:
Doh I have just found out how to do it
0
 
infradatelAuthor Commented:
Stupid Question
0
 
Hendrik WieseCommented:
As far as I know this can only be done using a script.

So you can add the following script into your GPO under User Configuration > Policies > Windows Settings > Script (Logon/Logoff)

Script: Just replace the *.FileExtension with the extension of the files that you would like to delete.
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.DeleteFile "C:\path\to\folder\[b]*.FileExtension[/b]", True 

Open in new window

0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
Hendrik WieseCommented:
hahah...refresh :) please post your solution for future users.
0
 
infradatelAuthor Commented:
If you go to Group Policy Management Editor you can obviously create a new GPO or edit an existing one.

User Config - Preferences - Windows Settings - Folders

Then create a new task to deltete folders and specify the path.
0
 
Hendrik WieseCommented:
Thanks!! :)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now