Skip to content

Instantly share code, notes, and snippets.

@LGM-AdrianHum
Created August 7, 2016 10:59
Show Gist options
  • Save LGM-AdrianHum/25d41d5efe6077e95a794b9693a42c53 to your computer and use it in GitHub Desktop.
Save LGM-AdrianHum/25d41d5efe6077e95a794b9693a42c53 to your computer and use it in GitHub Desktop.
public static void Main(string[] args)
{
List<string> arrHeaders = new List<string>();
Shell32.Shell shell = new Shell32.Shell();
Shell32.Folder objFolder;
objFolder = shell.NameSpace(@"C:\temp\testprop");
for( int i = 0; i < short.MaxValue; i++ )
{
string header = objFolder.GetDetailsOf(null, i);
if (String.IsNullOrEmpty(header))
break;
arrHeaders.Add(header);
}
foreach(Shell32.FolderItem2 item in objFolder.Items())
{
for (int i = 0; i < arrHeaders.Count; i++)
{
Console.WriteLine("{0}\t{1}: {2}", i, arrHeaders[i], objFolder.GetDetailsOf(item, i));
}
}
}
@LGM-AdrianHum
Copy link
Author

Add a reference to Microsoft Shell Controls and Automation from the COM tab of the References dialog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment