delete a file automatically
-
hi; is there any coding for deleting a particular file in specified period of time automatically in c#
the quieter u become more u hear
-
hi; is there any coding for deleting a particular file in specified period of time automatically in c#
the quieter u become more u hear
-
hi; is there any coding for deleting a particular file in specified period of time automatically in c#
the quieter u become more u hear
-
hi; is there any coding for deleting a particular file in specified period of time automatically in c#
the quieter u become more u hear
lawrenceinba wrote:
is there any coding for deleting a particular file in specified period of time automatically in c#
If you mean "is there a method to delete a file at a specific time in c#" then no - you have to write it yourself. But it isn't complex: 1) Create a Timer, give it a sensible interval of 1 minute, or 1 second - depends on how accurate you have to be with the delete time. Create a handler for the Tick event, and start the timer. 2) In the tick event, check if it is time to delete the file, and if so, does it exist. Use the File.Delete method to get rid of the file. You may want this as a service rather than a Windows Forms app, but that is up to you.
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
-
Use a timer to execute the file delete code periodically.
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest.
Honestly. It's the honest ones you want to watch out for...modified on Saturday, March 13, 2010 4:24 AM
can u explain me further more. else send me any examples for that
the quieter u become more u hear
-
can u explain me further more. else send me any examples for that
the quieter u become more u hear
-
hi; is there any coding for deleting a particular file in specified period of time automatically in c#
the quieter u become more u hear
Only after you write it.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001