Fw: [Mapserver-users] Deleting old GIF image files

Krzysztof Chodak k.chodak at autoguard.pl
Mon Jun 23 01:49:55 PDT 2003


I personally use wsh script (Windows):

 <job>
 <script language="JSCript">
 var fso = WScript.CreateObject("Scripting.FileSystemObject"),
  startDate = new Date(),
  folder = fso.GetFolder("D:\\tmp\\"),
  files = new Enumerator(folder.Files),
  file
 while (!files.atEnd())
 {
  file = files.item()
  if ((startDate - new Date(file.DateLastModified)) > 86400000)
  {
   file.Delete()
  }
  files.moveNext()
 }
 </script>
 </job>

 it is saved in CleanUpTemp.wsf file. I use Task Scheduling to run it from
 time to time (currently once per day). Script is launched by following
 command:
 C:\WINNT\system32\cscript.exe CleanUpTemp.wsf

 BR

Krzysztof Chodak

>
> ----- Original Message ----- 
> From: Thomas Jensen
> To: mapserver-users at lists.gis.umn.edu
> Sent: Monday, June 23, 2003 8:58 AM
> Subject: [Mapserver-users] Deleting old GIF image files
>
>
> Hi
>
> I would like to know if anyone can suggest a sollution to my problem. I
have
> used MapServer to generate mapImages on the www.langelandatlas.dk website.
> The problem is, that the ms_temp folder which contains the GIF image files
> rapidly is filled with old image files which are no longer used. Can
> MapServer be set ud to automatically delete the image files it has created
> after they have been used?
>
> Sincerely
>
> Thomas Jensen
> Sven Allan Jensen as
> Sankelmarksgade 9
> DK - 9000 Aalborg
> Ph: 96 31 40 64
> E-mail: tj at svaj.dk
> www.svaj.dk
>




More information about the MapServer-users mailing list