How do I delete the Temporary Internet files with CE Term?

Version 3

    Verified Product Versions

    Wavelink Naurtech CETerm 5.7

    Environment:

    CE Term

    Windows Mobile and Windows CE devices


    Question:

    How do I delete the Temporary Internet files with CE Term?


    Answer:

    On Windows CE devices, the cache settings can be changed in under Settings->Control Panel->Internet Options->General

     

    With CETerm scripting you can delete files using the command:


    var filename = "\\index.dat";
    OS.File.Delete( filename )
    
    
    
    
    
    


    You will need to specify the correct location of the file. OS.File.Delete() does not accept "wildcards", but you can use OS.File.List() to get a listing of files and directories and

    then delete as needed.


    Deleting the cache files will *not* fix a memory leak by a poorly written HTML application.

     

    Yes, you can delete the index.dat files with CETerm. They are not locked by CETerm, they are locked by the Microsoft browser components.

     

    To delete these files:

    1. Pocket IE must not be running.  You must exit the application,

      not simply hide it.

     

    2. CETerm must not have connected any browser session.  After the

      first browser session connects, the Microsoft components lock

      the file and do not release it until CETerm exits.  Disconnecting

      the CETerm session will not release the lock.

     

    You must delete the file in CETerm before any browser session

    is connected.  You can do this with an OnProgramStart handler

    as mentioned.  You must not have any session marked "Auto Connect".

    You can perform any desired connection within OnProgramStart

    after deleting the file

     

    function OnProgramStart()
    {
      // TODO: Put in the filename
      var filename = "\\index.dat";
      OS.File.Delete( filename )
    
      // TODO: Uncomment to autoconnect session
      //CETerm.PostIDA( "IDA_SESSION_S1", 1 );  // Session 1
      //CETerm.PostIDA( "IDA_SESSION_CONNECT", 1 ); // Session 1
    }
    


    NOTE: Be sure to unset any "Auto Connect" configuration.

     

    For more information please see the CETerm Scripting Guide:  http://www.naurtech.com/docs/Naurtech_CETerm_Scripting_Guide.pdf

     

     

    For more information please see the CETerm Scripting Guide:

    http://www.naurtech.com/docs/Naurtech_CETerm_Scripting_Guide.pdf