Skip to Main Content
HCL Domino Ideas Portal

Welcome to the #dominoforever Product Ideas Forum! The place where you can submit product ideas and enhancement request. We encourage you to participate by voting on, commenting on, and creating new ideas. All new ideas will be evaluated by HCL Product Management & Engineering teams, and the next steps will be communicated. While not all submitted ideas will be executed upon, community feedback will play a key role in influencing which ideas are and when they will be implemented.

For more information and upcoming events around #dominoforever, please visit our Destination Domino Page

Status No Plans to Implement
Workspace Domino Designer
Categories LotusScript
Created by Guest
Created on Nov 25, 2020

Need to get the Notes temporary folder location using LotusScript.

Notes temporary folder is generated randomly under Temp folder. Customer would like to get the handle of the folder using Lotusscript.

  • Attach files
  • Guest
    Reply
    |
    Sep 3, 2024

    I've got a function to get the notes tem folder:

    Option Declare

    Use "de.provesys.errorhandler"

    Declare Private Function OSGetSystemTempDirectory Lib "NNOTES" Alias "OSGetSystemTempDirectory" (ByVal S As String) As Integer

    '/**

    ' * Liest den temporaeren Notespfad aus und gibt ihn zurueck.

    ' * @return Gibt den Pfad zum Notestempverzeichnis zurueck.

    ' * @copyright ProVis GmbH

    ' * @author Stefan Kieckbusch

    ' * @version 2023-07-01

    ' */

    Public Function getNotesTempPath As String

    On Error GoTo ERROR_HANDLING

    Dim strBuffer As String : Let strBuffer = Space(256)

    Dim lngLength As Long : Let lngLength = OSGetSystemTempDirectory(strBuffer)

    Let getNotesTempPath = Left$(strBuffer, lngLength)

    Exit Function ' getNotesTempPath

    ERROR_HANDLING:

    Dim eeThis As New ErrorEntry(DESIGN_SCRIPT_LIBRARY, "de.provesys.file")

    Call eeThis.raiseError("", Nothing)

    Exit Function ' getNotesTempPath

    End Function ' getNotesTempPath

    Private Sub lsdoc_description

    %REM

    Funktionen und Prozeduren fuer Dateien und Dateisysteme.

    %END REM

    End Sub ' lsdoc_description

  • Guest
    Reply
    |
    Dec 2, 2020

    You can use AttachmentsDirectoryDelete=1 so that Notes deletes all temp files when you restart Notes Client.

  • Admin
    Thomas Hampel
    Reply
    |
    Dec 2, 2020

    The Notes client is supposed to remove temporary files when they are not required any longer. In case you want to do more cleaning yourself, delete all %temp% files during startup of the operating system.

  • Guest
    Reply
    |
    Nov 26, 2020

    We have requirement to auto delete the files which user had opened from Lotus Notes document.

    Lotus Notes have functionality to delete the files regularly once user close and restart the Lotus Notes client application from its temporary folder location.

    We are providing document link to users. If user click on link, it opens the attachment not the document. This document contain only one attachment, i.e. one document contain one attachment only.

    Now when user open the attachment, the file save in temp folder path, which we are getting from Environ("Temp") command in Lotusscript.

    For example, Environ("Temp") return the path location "C:\Windows\Temp".

    Our requirement is to save attachment in Lotus Notes's temporary folder location; for example in "C:\Windows\Temp\notes90C43B".

    This "notes90C43B" folder cannot be same, it varies depend on Lotus Notes version and other factors which we don't know.

    If we successfully extract the file in Lotus Notes's temporary folder then it will be get delete automatically when user restart the Lotus Notes client and file is not in use.

    Thank you for contacting us.

  • Guest
    Reply
    |
    Nov 26, 2020

    Customer would like to get this info in one of their applications through Lotus script.

    TempDir$ = Environ("Temp") will provide System temp folder. However Notes generates

    a random Notes temporary folder under the temp folder and currently the name of the Notes temporary folder is not stored any where and hence could not get the handle of that.

  • Admin
    Thomas Hampel
    Reply
    |
    Nov 26, 2020

    Can you please provide more details on the background of this request? What would you like to do with this temp folder? For your own applications, you can read the temp variable to obtain the sytem temp folder name.