(Doh! I had a mistake in the code.... Fixed it now. Was supposed to be !Directory.Exists) 

The following code executes at the beginning of a Pocket PC application run. It makes sure that the settings folder exists for that application.

using System;

using System.Collections.Generic;

using System.Text;

using System.IO;

 

namespace ConsoleApplication6

{

       class Program

       {

              static void Main(string[] args)

              {

                     if (!Directory.Exists(Config.SettingsDirectory))

                     {

                           Directory.CreateDirectory(Config.SettingsDirectory);

                     }

              }

       }

}

 

Things to ignore: Process race conditions, file system lock issues.