|
-
Apr 13th, 2003, 06:29 AM
#1
Thread Starter
Lively Member
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
-
Apr 13th, 2003, 08:02 AM
#2
yay gay
VB Code:
if Directory.Exists(fileName) = true then
'directory
else
'file
end if
\m/  \m/
-
Apr 13th, 2003, 08:30 AM
#3
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|