Alpha Video Training
Results 1 to 5 of 5

Thread: delete mpx on exit

  1. #1
    Jeff, Richards
    Guest

    Default delete mpx on exit

    I remember seeing a script that deletes the mpx files on alpha's exit.
    Anyone know where I can find it?

  2. #2
    "Certified" Alphaholic Scott Emerick's Avatar
    Real Name
    Scott Emerick
    Join Date
    Dec 2000
    Location
    Central Virginia/ North Carolina Border
    Posts
    2,154

    Default RE: delete mpx on exit

    This script was written by Cal Locklin

    Here you go: Link to Cals Script

  3. #3
    Member
    Real Name
    Phil DeGruy
    Join Date
    May 2003
    Posts
    264

    Default RE: delete mpx on exit

    Here is the rid .mpx file script that I use. I think it is the one you are looking for. It was created by Cal Lockin.

    Code:
    'Date Created: 17-Nov-2002 08:45:54 AM 
    'Last Updated: 17-Nov-2002 09:12:14 AM 
    'Created By : Cal 
    'Updated By : Cal 
    '----------------------------------------------------------------------- 
    ' THIS SCRIPT DELETES ALL FILES IN THE DATABASE THAT START WITH "$$". 
    ' THIS INCLUDES THE DATA PATH (start-in), PRIVATE PATH, AND EXECUTABLES PATH. 
    '----------------------------------------------------------------------- 
    '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 
    '@ IT WILL NOT WORK WELL AS A *FUNCTION* IN THE AUTO-EXEC BECAUSE IT 
    '@ TAKES TOO LONG TO FIRE FROM THERE. A FUNCTION WORKS FINE OUTSIDE 
    '@ THE AUTO-EXEC SCRIPT. 
    '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 
    '----------------------------------------------------------------------- 
    ' SET THE PATH NAMES TO AN ARRAY FOR LOOPING. 
    '----------------------------------------------------------------------- 
    DIM path(10) as c 
    
    path(1) = a5.get_path() + chr(92) 
    path(2) = a5.get_private_path() + chr(92) 
    pcount = 2 
    IF a5.get_private_path()  a5.get_exe_path() 
    path(3) = a5.get_exe_path() + chr(92) 
    pcount = 3 
    END IF 
    '--- DON'T BOTHER WITH THE SHARED PATH or MASTER PATH BECAUSE IT SHOULD 
    '--- NEVER PUT THESE FILES THERE. 
    
    '----------------------------------------------------------------------- 
    ' NOW DELETE ANY "$$**.*" FILES THAT ARE NOT LOCKED. 
    '----------------------------------------------------------------------- 
    fcount = 0 
    FOR x = 1 to pcount 
    type_of_files = 0 + FILE_FIND_ARCHIVE + FILE_FIND_READONLY + FILE_FIND_HIDDEN 
    dfiles = filefind.first( path(x) + "$$*.*", type_of_files ) 
    WHILE .not.dfiles.eof() 
    fname = dfiles.name() '*** GET THE FILE NAME. 
    ON ERROR goto Continue_next '*** FIND OUT IF THE FILE IS LOCKED. 
    fp = file.open( fname, file_rw_exclusive ) 
    ON ERROR goto 0 
    fp.close() '*** FILE IS NOT LOCKED SO CLOSE IT AND REMOVE IT. 
    file.remove( fname ) 
    fcount = fcount + 1 
    '--------------- 
    Continue_next: 
    '--------------- 
    ON ERROR goto 0 
    dfiles.next() '*** GET NEXT FILE IN LIST. 
    statusbar.robot() 
    END WHILE 
    NEXT
    a5.close()

    Phil DeGruy

  4. #4
    Jeff, Richards
    Guest

    Default RE: delete mpx on exit

    Wasn't there one that you would put on your form that deleted the MPX files on exit. It was one line.

    If not, where do I place Cals script?

  5. #5
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default RE: delete mpx on exit

    You can put it pretty much anywhere you want but I save it as a global script called Del_dollar then call it from the autoexec with:

    script_play("del_dollar")

Similar Threads

  1. Exit from X
    By Alan Lucas in forum Alpha Five Version 6
    Replies: 13
    Last Post: 09-30-2007, 09:42 PM
  2. Backup and Exit
    By Charles Hoens in forum Alpha Five Version 5
    Replies: 1
    Last Post: 02-09-2003, 08:59 AM
  3. run on exit
    By Ed Edgar in forum Alpha Five Version 4
    Replies: 2
    Last Post: 01-09-2002, 07:29 AM
  4. Exit a Query?
    By Bob Elliott in forum Alpha Five Version 4
    Replies: 6
    Last Post: 08-07-2001, 01:45 AM
  5. Exit from A5
    By Barry Potter in forum Alpha Five Version 4
    Replies: 4
    Last Post: 05-08-2000, 06:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •