PDFs in the PrintQueue Directory

MelissaS

Active Member
We use shared profiles for our users in our Citrix farm. All users point to the same server (Win 2000) where they each have their own directory with their own PrintQueue folder in it. We have a 30 day retention policy for PDF files in JDE. I would like to know if anyone has a script or app what will delete the PDFs in those user's folders that are older than 30 days.

Thanks!
 
You could use Windows Script Hos. I call it daily when I recycle my Citrix Servers.

' Deletes all files in given folder that are older than x days
'
Option Explicit

Const path = "E:\B7\PrintQueue"
Const daysOld = 60

Dim f
Dim fso, fo, wsh, fileList

Set wsh = WScript.CreateObject ("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
Set fo = fso.GetFolder( path )
Set fileList = fo.Files

For Each f In fileList
If f.DateLastModified < (Date - daysOld ) Then
f.Delete
End If
Next
 
We have similar script but scheduled to run on the windows scheduler at certain time of the day.
 
We have developed a program to automatically delete from a given file at a given time if you are interested. You can set the file location, delete from days and time
 
Back
Top