Jump to content
Fórum Script Brasil
  • 0

Apagar arquivos temporários


MRMB

Question

Pessoal,

Estou precisando recuperar o diretório do usuário de arquivos temporários (Cache do Internet Explorer).

Em C#, VB.net e bem prático obter essa informação. Contudo, estou tendo dificuldade para programar um código em VB6.

Desde já agradeço quem puder ajudar.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Pessoal,

Consegui resolver o problema. Segue abaixo o código que utilizei caso alguém venha a precisar.

Option Explicit

Private Declare Function SHGetSpecialFolderPath Lib "shell32.dll" Alias "SHGetSpecialFolderPathA" (ByVal hwnd As Long, ByVal pszPath As String, ByVal csidl As Long, ByVal fCreate As Long) As Long

Private Const CSIDL_HISTORY As Long = &H22
Private Const CSIDL_COKIES As Long = &H21
Private Const CSIDL_INTERNET_FILES As Long = &H20


Private Sub Command_Click()
    
    Dim sPath As String
    
    sPath = Space(260)
    
    SHGetSpecialFolderPath Me.hwnd, sPath, CSIDL_INTERNET_FILES, False

    MsgBox sPath
    
End Sub

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...