Author: orion846 | Posted on: 8/13/2008 10:50:27 PM | Views : 1428

hey guys,
i'm using file.move quite a bit in this project because it's an image gallery and i want users to be able to delete their files. however instead of actually deleting them, i'm using file.move to put them in a locked directory, just incase some sort of authority came asking about a file that someone tried to delete awhile ago. anyway i'm getting errors when trying SOMETIMES, because of your standard windows 'file is in use' error when trying to delete or move something.
File.Move("C:\\files\\" + ((Label)gvr.FindControl("Label3")).Text, "C:\\deleted\\" + ((Label)gvr.FindControl("Label3")).Text);

 the above is essentially my code for the linkbutton DELETE in a column for a gridview. it works fine assuming the image isn't or wasn't in use recently, but if it was, the user gets a windows error message in their browser and the file doesn't move. is there a way to force a kill ...

Go to the complete details ...