Link to home
Start Free TrialLog in
Avatar of ipjyo
ipjyoFlag for United States of America

asked on

When do we use Backgroundworker?

Hi,

My C# application invokes upload process to upload a file.

System.Diagnostics.Process.Start("C:\\Temp\\Upload.cmd", "File1");
I need to delete this file after it gets uploaded. How can I make sure to delete this file only after it is uploaded? Can I use Backgroundworker in this scenario and delete file in the "RunWorkerCompleted" method? Is this a good practice?

Thanks for any suggestions.

ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ipjyo

ASKER

Thank you very much. It is working great..