Results 1 to 3 of 3

Thread: Temp files?

  1. #1

    Thread Starter
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Temp files?

    Can anyone tell me the location of them? I want to make a program that will delete them automatically for me on startup.

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Temp files?

    I forget where I got this, but it returns the Environment variables.

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Load()
    4.   Dim ff As Integer
    5.   ff = FreeFile
    6.   Open App.Path & "\Environment.txt" For Output As #ff
    7.   'Set form autoredraw property to true to get this example
    8.   'to work
    9.   Dim myuser As Variant
    10.   Dim I As Integer
    11.   'used to test if any environment variables exist
    12.   'sometimes they don't
    13.   Dim sTemp As String
    14.   I = 1
    15.   myuser = Environ(I)
    16.   sTemp = myuser
    17.   Form1.Print "   " & Environ(I)
    18.   Print #ff, Environ(I)
    19.   I = I + 1
    20.   'Print all values on form
    21.   Do While Len(myuser) > 0
    22.        Form1.Print "   " & Environ(I)
    23.        Print #ff, Environ(I)
    24.        I = I + 1
    25.        myuser = Environ(I)
    26.        sTemp = sTemp & myuser
    27.       ' Print #ff, myuser
    28.   Loop
    29.   If Len(sTemp) = 0 Then
    30.     Form1.Print _
    31.       "No environment variables exist"
    32.     Print #ff, "No environment variables exist"
    33.   End If
    34.   Close #ff
    35. End Sub

    You can then find the variables you need concerning the TEMP and TMP folders.

  3. #3
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765

    Re: Temp files?

    On XP... C:\Documents and Settings\Your Username\Local Settings\Temp\

    I think... there might be an Application Data folder or something in there as well :\
    Don't Rate my posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width