Results 1 to 3 of 3

Thread: File Watcher Class - Deleting - Simple?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Posts
    94

    Unhappy File Watcher Class - Deleting - Simple?

    Hey there.

    Im using the File Watcher class at the moment but im having a problem. When a user deletes a folder or file all i get is the path name. Like...

    D:\My Documents

    was deleted. It doesnt tell me if it was a folder or a file. And i could check for extensions but sometimes files may not have extensions, and hence the program would think it was a folder.

    Ive tried, stupidly i might add, to "get" the file / folder to check but since its already "deleted" this fails.

    Hopefully theres a way, if not ill have to create a work around.

    Thanks a lot.

    Gav

  2. #2
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    VB Code:
    1. if Directory.Exists(fileName) = true then
    2. 'directory
    3. else
    4. 'file
    5. end if
    \m/\m/

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Posts
    94
    Thanks for the post but its not what i was after, this is because the event is raised AFTER the directory / file is deleted hence if i use your code (i tried various attempts before posting my first message) the item defaults to the ELSE statement because indeed the directory doesnt exist because its been deleted.

    Guess im gonna have to look for another work around then.

    Gav

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