This project has moved and is read-only. For the latest updates, please go here.


Jun 1, 2012 at 10:33 AM


While using the taskService.GetFolder method i receive an exception saying FileNotFoundException: 'The system cannot find the file specified. (Exception from HRESULT: 0x80070002)'

After checking i found that the folder that i was trying to get was deleted from the WindowsTaskScheduler


taskService.GetFolder("My Tasks");

and the folder "My Tasks" got deleted from the Windows Task Scheduler.

I wanted to know that how can we check if the folder in which our tasks are stored exists or not so that i can check it before hand.


Jun 13, 2012 at 6:07 PM

There is no "HasFolder" method or anything like it. I would call the GetFolder method and handle the FileNotFoundException as an indicator that the folder does not exist.