|
-
May 30th, 2006, 12:32 PM
#1
Delete file problem
I want to delete the file in one particular directory. I get error message while any file from that directory is opened.Is it posible to delete that file even it is open.
-
May 30th, 2006, 12:35 PM
#2
Re: Delete file problem
 Originally Posted by danasegarane
I want to delete the file in one particular directory. I get error message while any file from that directory is opened.Is it posible to delete that file even it is open.
The file needs to be closed before you can delete it.
What directory are you trying to delete it from and what is the error message that you receive?
-
May 30th, 2006, 12:38 PM
#3
Re: Delete file problem
I have manually created a directory like c:\files.
-
May 30th, 2006, 12:40 PM
#4
Re: Delete file problem
 Originally Posted by danasegarane
I have manually created a directory like c:\files.
Ok. What is the error?
If you manually created the directory, then after it has been created it is empty. How does it get files in it?
-
May 30th, 2006, 12:47 PM
#5
Re: Delete file problem
In the command click event I am copying(file system object) a file from path c:\ to c:\files. During the process when I use the kill command to delete all the files in the folder. While doing so if any files accidently opened from the directory it produces a error message command failed in the copy method
-
May 30th, 2006, 01:35 PM
#6
Re: Delete file problem
You can't delete a folder that has open files in it. Close the files first.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
May 30th, 2006, 01:45 PM
#7
Re: Delete file problem
 Originally Posted by danasegarane
In the command click event I am copying(file system object) a file from path c:\ to c:\files. During the process when I use the kill command to delete all the files in the folder. While doing so if any files accidently opened from the directory it produces a error message command failed in the copy method
If you are trying to delete the files from the source folder once they have been copyed to the target folder (thus, performing a "move") then the best way would be to first do the complete copy. When the copy is done, your program will no longer have a connection to the file, so now you can go back and delete them.
-
May 30th, 2006, 02:59 PM
#8
Re: Delete file problem
Post the code you have we will help you to solve the problem.
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
|