Results 1 to 3 of 3

Thread: GPP Folders

  1. #1
    stevej is offline Getting Started on GPanswers.com
    Join Date
    Sep 2010
    Posts
    2

    Cool GPP Folders

    I would really appreciate any help with this problem regarding Folders.
    Using GPP I delete a folder called Temp and then create it again when another student logs into the machine. The problem is that our organisation has lowered the default refresh time down to 15mins. The effect that this has is to delete all the files which have been saved in the Temp folder.
    This is how I have tried to fix this issue, in the properties on the Common tab; I have selected to Apply once and do not reapply, this solves the problem for the current user in that the files are no longer deleted. However when the next student logs into the machine; all of the files from the previous student are still in the folder so it's not being deleted and recreated each time.
    Any advice much appreciated.
    The settings are under the User Configuration.

  2. #2
    scottzaiss is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    118

    Default

    I would try using VBScript to clean the contents from C:\Temp on user logout.
    Try the following...


    On Error Resume Next

    Set WshShell = CreateObject("WScript.Shell")
    Set objFSO = CreateObject("Scripting.FileSystemObject")

    Set objFolder = objFSO.GetFolder("c:\temp:")

    'Delete Files
    Set colFiles = objFolder.Files
    For Each objFile in colFiles
    objFSO.DeleteFile(objFile.Path)
    Next

    'Delete Folders
    For Each objSubFolder In objFolder.SubFolders
    objSubFolder.Delete(true)
    Next

  3. #3
    stevej is offline Getting Started on GPanswers.com
    Join Date
    Sep 2010
    Posts
    2

    Default

    We were using vb scripts to do this before but just wanted to see if it was possible with the GPP.
    Thanks for the reply, much appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Friendly URLs by vBSEO