no found namespace shell32 code example
Example 1: shell32.dll c# example
private static void CollectFiles(string folder)
{
Shell32.Shell shell = new Shell32.Shell();
Shell32.Folder objFolder = shell.NameSpace(folder);
foreach (Shell32.FolderItem2 item in objFolder.Items())
{
if (item.IsFolder)
CollectFiles(item.Path);
else
{
if (!item.Type.ToUpper().StartsWith("MP3") && !item.Type.ToUpper().StartsWith("MPEG"))
{
LogError(item.Name + " has unsuupported file type of " + item.Type);
continue;
}
FileData fileData = new FileData();
fileData.name = item.Name;
fileData.size = item.Size;
fileData.modified = item.ModifyDate;
fileData.path = item.Path;
fileData.type = item.Type;
int.TryParse(objFolder.GetDetailsOf(item, yearID), out fileData.year);
string properName = fileData.name.Split(new char[] { '.' })[0];
if (dict.ContainsKey(fileData.size))
{
LogError(fileData.name + " clashed with " + dict[fileData.size].name);
count++;
}
dict[fileData.size] = fileData;
}
}
}
Example 2: shell32.dll c# example
public void ZipFile(string Input, string Filename)
{
Shell32.Shell Shell = new Shell32.Shell();
CreateZipFile(Filename);
Shell.NameSpace(Filename).CopyHere(Input,0);
System.Threading.Thread.Sleep(2000);
}
}