Steve, (B
Thanks for the code. I think I (Bwill start using that part where it checks for the database and then closes (Bthe application if the DB is unavailable. I have answered too many (Bsupport calls where this is the case, and it throws a red herring into (Bthe mix because on the phone i think there is an error in the DB (B
(B
Also. it looks as though the DEL really (Bdoes work - it just doesn't work in my application where I have an "exit" (Bbutton. I have to test all the routines and then discuss this with (BRBTI. (B
(B
Thanks all for your comments on this (Bthread. (B
Bob C. (B
(B
(B
(B
| Steve Breen <[EMAIL PROTECTED]>
(B
(B Sent by: [email protected] (B 04/30/2005 02:58 PM (B
(B |
(B
(B
|
(B
(B
Bob, (B
(B
We have set up our system to store (Bthese temporary $$$ at the workstaion level in a the C:\WINDOWS\TEMP directory (Band then these files are deleted each time the computer is started up and (Blogged into the network. We use the network logon script to do this. (B
(B
If you are using Windows 2000 (Byou have to make a windows\temp directory. (B
(B
We also have a dos batch file (Bthat runs nightly on the data directory to eliminate any stray files. (B
(B
The following is used on application (Bstart up. as you can see we set the scratch file directory right at application (Bstart up. (B
(B
In addition to this you can see (Bthe old commands we used to delete these file types on application start (Bup (B
(B
-- DBSTART←
(B-- Connects database and sets various parameters. Issues error message←
(B-- and terminates application if database is unavailable←
(B←
(B-- THE FOLLOWING COMMAND ERASE TEMP FILES FROM THE LOCAL AND C DRIVES←
(B←
(B-- ERASE *.$$$←
(B-- ERASE c:\WINDOWS\TEMP\*.$$$←
(B←
(Bset quote='←
(Bset err var verr←
(Bset var verr1 int←
(B←
(Bset scratch c:\windows\temp←
(B←
(Bconnect breakdn ←
(Bset var verr1 = .verr←
(Bif verr1 ne 0 then←
(B cls←
(B set var xmsg text = 'Database Unavailable.'←
(B set var xmsg = (.xmsg + ' Error Code = ' + (ctxt(.verr1)))←
(B pause 1 using .xmsg at cen cen black on red←
(B exit← (B
(B
(B
Just some other idea's for managing (Bthese files. (B
(B
Steve Breen (B
(B
(B
(B
(B
(B
-----Original Message-----
(BFrom: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
(BSent: Saturday, April 30, 2005 12:16 PM
(BTo: [email protected]
(BSubject: [RBG7-L] - Re: $$$ files
(B (B
(BYes !!! Of course, the ERASE command. I went right by it while (Bsearching all the commands. Now the caveat.....it does work in an (Bapplication if you exit with the "X", but if you have a button (Bwith an EXIT command it bypasses the "on close" commands in an (BRBA application. I am going to have to test this out more fully to (Bsee if this is a boo boo or just the way the EXIT command works. Maybe (BRazzak can enlighten us, as always. More experimentation is needed (Bfor sure.
(BThanks for the tip, Jan.
(BBob C.
(B
(B (B
| "jan johansen"
(B<[EMAIL PROTECTED]> (BSent by: [email protected] (B 04/30/2005 12:41 PM
(B
(B
(B |
(B (B
(B (B
|
(B
(B
(BBob,
(B
(BRazzak recently posted this very topic.
(BI believe that the R:Base command would be
(BERASE *.$$$
(B
(BJan
(B-----Original Message-----
(BFrom: [EMAIL PROTECTED]
(BTo: [email protected] (RBG7-L Mailing List)
(BDate: Sat, 30 Apr 2005 12:01:45 -0400
(BSubject: [RBG7-L] - Re: $$$ files
(B
(B
(BThanks, Bill - are you sure that DEL is a valid rbase command for files? (B I tried this in an application close and it didn't work, and I could (Bnot find it in the help files. I am trying to keep a tight lid on (Bmy programs and not get into too many CMD or Command routines outside of (BR:base - it just adds to the confusion on a big network. I was hoping (Bto keep this all in a compiled app...
(BFor now I will use your suggestion, though.
(BBob C.
(B (B
| Bill Downall <[EMAIL PROTECTED]>
(B (BSent by: [email protected] (B04/30/2005 11:13 AM (B (B
(B |
(B
(B (B (B
|
(B
(B
(B
(BBob,
(B
(BI have a little DOS batch file named DELCRAP.CMD
(BIt runs occasionally as a "scheduled task."
(BIt does not run through R:BASE, but through the command processor
(BCMD.EXE. Turns out all of the commands are also R:Base commands, so you (B
(Bcould concievably also run it at startup with an R:Base RUN command.
(B
(BAt the command line, if a $$$ file is "in use", it just gets (Bskipped,
(Band all the others still get deleted. If you select a bunch of $$$ files (B
(Bin explorer and "delete", at the first open file Windows gives (Bup and
(Bstops deleting any more, so this works a lot better.
(B
(BREM DELCRAP.CMD
(BR:
(Bcd \myappdir
(BDEL *.BAK
(BDEL *.$*
(BDEL *.DBG
(BDEL JUNK*.*
(BDEL *.VWR
(BEXIT
(B
(B
(B[EMAIL PROTECTED] wrote:
(B>
(B>
(B> I know I used to do this in DOS, but I am having a post-Friday night (B
(B> brain lock.
(B> On a cleanup from an application, I want to delete as many $$$ files (Bas
(B> will allow. Wasn'e there a command in R:Base to delete files (Bin the
(B> current directory? Why can't I remember this???
(B> How does anyone else clean up their directories?
(B> Thanks
(B> Bob C.
(B
(B (B
