Results 1 to 2 of 2

Thread: Kill *.tmp

  1. #1

    Thread Starter
    Fanatic Member cid's Avatar
    Join Date
    Nov 2002
    Location
    Fort Worth, Texas
    Posts
    854

    Kill *.tmp

    I need code similar to this:
    VB Code:
    1. Kill (app.path & "\*.tmp")
    The following code does not work it says file not found.

    www.google.com - Pay Tribute.

    Always Listening To: Thrice

  2. #2
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871

    VB Code:
    1. Private Sub Form_Load()
    2. Dim strDir As String
    3. strDir = Dir$(App.Path & "\", vbDirectory)
    4. Do While strDir <> ""
    5. If Right(strDir, 4) = ".tmp" Then
    6. Kill App.Path & "\" & strDir
    7. End If
    8. strDir = Dir
    9. Loop
    10. End Sub
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

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