Results 1 to 4 of 4

Thread: how can I refresh a directory?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    how can I refresh a directory?

    I'm trying to delete a file, and then I want to double-check to make sure that the file is actually deleted. But even when the file is deleted by my program, Dir$ (fileName, vbNormal) tells me that it has not been deleted. I guess it takes a few seconds for windows to refresh the directory.
    Is there a way to refresh a specified directory?!!

  2. #2

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    anyone can help!!!!

  3. #3
    Addicted Member Pickler's Avatar
    Join Date
    May 2001
    Location
    nffanb
    Posts
    248
    Not exactly any great help
    But I don't get the same problem.
    Kill a 20MB file do a Dir$ check straight after, all clear

  4. #4
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    Like Pickler, I neither get any problems like u'r describing...

    VB Code:
    1. Private Sub Command1_Click()
    2.     Kill "C:\a\test.txt"
    3.     If Dir("C:\a\test.txt", vbNormal) = "" Then
    4.         MsgBox "nix more file"
    5.     Else
    6.         MsgBox "ohyeahhh.. file bigtime"
    7.     End If
    8. End Sub

    works like it should...

    maybe if u posted the snippet in question ?
    -= a peet post =-

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