void ProcessFileNode(TreeNode node)
{
SEItem shellEx = (SEItem)node.Tag;
//reconstruct full (File not treeView) path
string newPath = (node.Index * spaceBetweenItems).ToString("D2") + "." + shellEx.GetLogicalFileName();
TreeNode child = node;
TreeNode parent;
while ((parent = child.Parent) != null)
{
newPath = Path.Combine((parent.Index * spaceBetweenItems).ToString("D2") + "." + (parent.Tag as SEItem).GetLogicalFileName(), newPath);
child = parent;
}
newPath = Path.Combine(baseDirectory, newPath);
//Trace.WriteLine(newPath);
if (newPath != shellEx.location)
{
if (!Directory.Exists(Path.GetDirectoryName(newPath)))
{
Directory.CreateDirectory(Path.GetDirectoryName(newPath));
}
File.Move(shellEx.location, newPath);
}
}