Page 1 of 1

Clearing the spool directory

Posted: Thu Jul 16, 2015 7:14 am
by gtisdale
From time to time we run into the problem of the SPOOL directory being full and a print job cannot complete.
I have added a function to FNSNAP.dll to remedy this FNCLRSPL

IF you add this to your menu program just before your user exits from BR it will clear both the PDF and regular files stored in the spool directory.

IF you would rather just add the code it is listed below:

Code: Select all

00300 DEF LIBRARY FNCLRSPL(;_A$*250,_B$*250) !:
      ! ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿!:
      ! ³ Clears the SPOOL directory for all files for the current     ³!:
      ! ³ SESSION$ number                                              ³!:
      ! ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ!
00305 OPEN #1: "NAME=[SPOOLPATH]\test.txt,replace",DISPLAY,OUTPUT 
00310 PRINT #1: "XXXXXXX"
00315 LET _A$=FILE$(1)
00320 CLOSE #1: 
00325 LET _B$=SREP$(_A$,"test.txt","")
00330 EXECUTE "free "&_B$&"wbspl"&SESSION$&".*" IOERR 335
00335 EXECUTE "free "&_B$&"brpdf"&SESSION$&".*" IOERR 340
00340 FNEND 

Re: Clearing the spool directory

Posted: Thu Jul 16, 2015 8:15 am
by GomezL
That's pretty nifty!

I actually use the following to "Remap" my Spoolpath:

EXECUTE "CONFIG SPOOLPATH "&Env$("TEMP")

For Client Server, I maintain a Env$("CS_TEMP") folder, and point spool path there.
IF Env$("CS_TEMP")<>"" THEN !:
EXECUTE "CONFIG SPOOLPATH @::"&Env$("CS_TEMP")