Clearing the spool directory

Discussion about printing issues and techniques.

Moderators: Susan Smith, admin, Gabriel

Post Reply
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Clearing the spool directory

Post 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 
GomezL
Posts: 258
Joined: Wed Apr 29, 2009 5:51 am
Contact:

Re: Clearing the spool directory

Post 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")
Post Reply