المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Windows 7 and Directory.Exists ???



C# Programming
11-07-2009, 01:14 PM
I have the following lines of code (2.0 framework) that worked in Win XP, but doesn't work with Windows 7:

if (!Directory.Exists(@"c:\Program Files\Newsham\PigtrakDesktop\RAPI"))
{
Directory.CreateDirectory(@"c:\Program Files\Newsham\PigtrakDesktop\RAPI");
}

Here's the weird part: If I try to navigate to c:\Program Files\Newsham\PigtrakDesktop using the Windows 7 explorer, the RAPI directory is NOT there.

However, in my code, if tell it to list the files in the same directory, there ARE FILES THERE!

This is really killing me. Any thoughts?