Index: src/ch/FeedbackNotEnoughSpaceDlg.cpp
===================================================================
diff -u -r4797e4b6b266900bfdcdf4ca6eda47c216ad9db1 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/ch/FeedbackNotEnoughSpaceDlg.cpp	(.../FeedbackNotEnoughSpaceDlg.cpp)	(revision 4797e4b6b266900bfdcdf4ca6eda47c216ad9db1)
+++ src/ch/FeedbackNotEnoughSpaceDlg.cpp	(.../FeedbackNotEnoughSpaceDlg.cpp)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -18,12 +18,11 @@
 ***************************************************************************/
 #include "stdafx.h"
 #include "ch.h"
-#include "../libchcore/TFileInfo.h"
 #include "FeedbackNotEnoughSpaceDlg.h"
 #include "StringHelpers.h"
 #include "FeedbackHandler.h"
-#include "FileSupport.h"
 #include "resource.h"
+#include "../libchcore/TLocalFilesystem.h"
 
 #ifdef _DEBUG
 #define new DEBUG_NEW
@@ -34,12 +33,12 @@
 /////////////////////////////////////////////////////////////////////////////
 // CFeedbackNotEnoughSpaceDlg dialog
 
-
 CFeedbackNotEnoughSpaceDlg::CFeedbackNotEnoughSpaceDlg(unsigned long long ullSizeRequired, const wchar_t* pszSrcPath, const wchar_t* pszDstPath)
 	:ictranslate::CLanguageDialog(IDD_FEEDBACK_NOTENOUGHSPACE_DIALOG),
-	m_bAllItems(FALSE),
+	m_strDisk(pszDstPath),
 	m_ullRequired(ullSizeRequired),
-	m_strDisk(pszDstPath)
+	m_bAllItems(FALSE),
+	m_fsLocal(GetLogFileData())
 {
 	m_vstrFiles.push_back(pszSrcPath);
 }
@@ -80,10 +79,21 @@
 	pWnd=GetDlgItem(IDC_REQUIRED_STATIC);
 	if (pWnd)
 		pWnd->SetWindowText(GetSizeString(m_ullRequired));
-	unsigned long long ullFree;
+
+	unsigned long long ullFree = 0, ullTotal = 0;
 	pWnd=GetDlgItem(IDC_AVAILABLE_STATIC);
-	if (pWnd && GetDynamicFreeSpace(m_strDisk, &ullFree, nullptr))
+	if(pWnd)
+	{
+		try
+		{
+			m_fsLocal.GetDynamicFreeSpace(chcore::PathFromString(m_strDisk), ullFree, ullTotal);
+		}
+		catch(const std::exception&)
+		{
+			ullFree = 0;
+		}
 		pWnd->SetWindowText(GetSizeString(ullFree));
+	}
 }
 
 BOOL CFeedbackNotEnoughSpaceDlg::OnInitDialog() 
@@ -133,10 +143,19 @@
 	if (nIDEvent == 1601)
 	{
 		// update free space
-		unsigned long long ullFree;
+		unsigned long long ullFree = 0, ullTotal = 0;
 		CWnd *pWnd=GetDlgItem(IDC_AVAILABLE_STATIC);
-		if (pWnd && GetDynamicFreeSpace(m_strDisk, &ullFree, nullptr))
+		if (pWnd)
 		{
+			try
+			{
+				m_fsLocal.GetDynamicFreeSpace(chcore::PathFromString(m_strDisk), ullFree, ullTotal);
+			}
+			catch(const std::exception&)
+			{
+				ullFree = 0;
+			}
+
 			pWnd->SetWindowText(GetSizeString(ullFree));
 
 			// end dialog if this is enough
Index: src/ch/FeedbackNotEnoughSpaceDlg.h
===================================================================
diff -u -ra27d1acf1bda3c25b6dcce0d0eb0278009ce63ae -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/ch/FeedbackNotEnoughSpaceDlg.h	(.../FeedbackNotEnoughSpaceDlg.h)	(revision a27d1acf1bda3c25b6dcce0d0eb0278009ce63ae)
+++ src/ch/FeedbackNotEnoughSpaceDlg.h	(.../FeedbackNotEnoughSpaceDlg.h)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -18,6 +18,7 @@
 ***************************************************************************/
 #ifndef __FEEDBACKNOTENOUGHSPACEDLG_H__
 #define __FEEDBACKNOTENOUGHSPACEDLG_H__
+#include "../libchcore/TLocalFilesystem.h"
 
 /////////////////////////////////////////////////////////////////////////////
 // CFeedbackNotEnoughSpaceDlg dialog
@@ -47,11 +48,15 @@
 	afx_msg void OnTimer(UINT_PTR nIDEvent);
 	afx_msg void OnRetryButton();
 	afx_msg void OnIgnoreButton();
+	afx_msg void OnBnClickedCancel();
 
 	DECLARE_MESSAGE_MAP()
+
 public:
 	BOOL m_bAllItems;
-	afx_msg void OnBnClickedCancel();
+
+private:
+	chcore::TLocalFilesystem m_fsLocal;
 };
 
 #endif
Fisheye: Tag 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4 refers to a dead (removed) revision in file `src/ch/FileSupport.cpp'.
Fisheye: No comparison available.  Pass `N' to diff?
Fisheye: Tag 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4 refers to a dead (removed) revision in file `src/ch/FileSupport.h'.
Fisheye: No comparison available.  Pass `N' to diff?
Index: src/ch/FolderDialog.cpp
===================================================================
diff -u -r4797e4b6b266900bfdcdf4ca6eda47c216ad9db1 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/ch/FolderDialog.cpp	(.../FolderDialog.cpp)	(revision 4797e4b6b266900bfdcdf4ca6eda47c216ad9db1)
+++ src/ch/FolderDialog.cpp	(.../FolderDialog.cpp)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -24,7 +24,6 @@
 #include "Theme Helpers.h"
 #include "shlobj.h"
 #include "StringHelpers.h"
-#include "FileSupport.h"
 #include "TRecentPathsTools.h"
 #include "resource.h"
 #include "shortcuts.h"
@@ -35,7 +34,7 @@
 static char THIS_FILE[] = __FILE__;
 #endif
 
-// dialog jako taki
+// dialog template
 const unsigned long __g_DlgTemplate[]={ 
 	0x82cf0040, 0x00000000, 0x00000000, 0x011b0000, 0x000000b4, 0x00000000, 0x00540008, 0x00680061, 
 	0x006d006f, 0x00000061 };
@@ -149,8 +148,9 @@
 /////////////////////////////////////////////////////////////////////////////
 // CFolderDialog dialog
 
-CFolderDialog::CFolderDialog(CWnd* /*pParent*/ /*=nullptr*/)
-				:ictranslate::CLanguageDialog()
+CFolderDialog::CFolderDialog(CWnd* /*pParent*/ /*=nullptr*/) :
+	ictranslate::CLanguageDialog(),
+	m_fsLocal(GetLogFileData())
 {
 	m_hImages=nullptr;
 	m_hLargeImages=nullptr;
@@ -662,12 +662,17 @@
 		if (!bSkipFreeSpace)
 		{
 			// get disk free space
-			unsigned long long ullFree, ullTotal;
-			if (GetDynamicFreeSpace(strPath, &ullFree, &ullTotal))
+			unsigned long long ullFree = 0, ullTotal = 0;
+
+			try
 			{
+				m_fsLocal.GetDynamicFreeSpace(chcore::PathFromString(strPath), ullFree, ullTotal);
 				m_strTip += GetResManager().LoadString(IDS_BDFREESPACE_STRING) + GetSizeString(ullFree, false) + _T("\n");
 				m_strTip += GetResManager().LoadString(IDS_BDCAPACITY_STRING) + GetSizeString(ullTotal, false) + _T("\n");
 			}
+			catch (const std::exception&)
+			{
+			}
 		}
 	}
 
@@ -701,12 +706,16 @@
 	m_strTip=sc.m_strName+_T("\r\n")+CString(GetResManager().LoadString(IDS_BDPATH2_STRING))+sc.m_strPath;
 
 	// get disk free space
-	unsigned long long ullFree, ullTotal;
-	if (GetDynamicFreeSpace(sc.m_strPath, &ullFree, &ullTotal))
+	unsigned long long ullFree = 0, ullTotal = 0;
+	try
 	{
-		m_strTip+=CString(_T("\r\n"))+GetResManager().LoadString(IDS_BDFREESPACE_STRING) + GetSizeString(ullFree, false) + _T("\n");
-		m_strTip+=GetResManager().LoadString(IDS_BDCAPACITY_STRING) + GetSizeString(ullTotal, false);
+		m_fsLocal.GetDynamicFreeSpace(chcore::PathFromString(sc.m_strPath), ullFree, ullTotal);
+		m_strTip += CString(_T("\r\n")) + GetResManager().LoadString(IDS_BDFREESPACE_STRING) + GetSizeString(ullFree, false) + _T("\n");
+		m_strTip += GetResManager().LoadString(IDS_BDCAPACITY_STRING) + GetSizeString(ullTotal, false);
 	}
+	catch(const std::exception&)
+	{
+	}
 
 	pit->pszText=(LPTSTR)(LPCTSTR)m_strTip;
 	pit->cchTextMax=m_strTip.GetLength()+1;
Index: src/ch/FolderDialog.h
===================================================================
diff -u -r8068e0c351055554340ac9755d1bc846893bf2b8 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/ch/FolderDialog.h	(.../FolderDialog.h)	(revision 8068e0c351055554340ac9755d1bc846893bf2b8)
+++ src/ch/FolderDialog.h	(.../FolderDialog.h)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -35,6 +35,7 @@
 #include "DirTreeCtrl.h"
 #include "ThemedButton.h"
 #include "../libictranslate/LanguageDialog.h"
+#include "../libchcore/TLocalFilesystem.h"
 
 /////////////////////////////////////////////////////////////////////////////
 // CFolderDialog dialog
@@ -143,9 +144,9 @@
 	afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
 	//}}AFX_MSG
 	DECLARE_MESSAGE_MAP()
+
+private:
+	chcore::TLocalFilesystem m_fsLocal;
 };
 
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
 #endif
Index: src/ch/MainWnd.cpp
===================================================================
diff -u -r772856340344b3c47cda9c4d6f75931f7c99e927 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/ch/MainWnd.cpp	(.../MainWnd.cpp)	(revision 772856340344b3c47cda9c4d6f75931f7c99e927)
+++ src/ch/MainWnd.cpp	(.../MainWnd.cpp)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -33,8 +33,6 @@
 #include <boost/shared_array.hpp>
 #include "../common/TShellExtMenuConfig.h"
 #include "../libchcore/TConfig.h"
-#include "FileSupport.h"
-#include "StringHelpers.h"
 #include "../libchcore/TCoreException.h"
 #include "../libchcore/TTaskManagerStatsSnapshot.h"
 #include "../libchcore/TSQLiteSerializerFactory.h"
@@ -699,7 +697,6 @@
 			try
 			{
 				chcore::TConfig& rConfig = GetConfig();
-				ictranslate::CResourceManager& rResManager = GetResManager();
 
 				TShellExtMenuConfig cfgShellExt;
 
@@ -710,179 +707,19 @@
 				cfgShellExt.SetInterceptKeyboardActions(GetPropValue<PP_SHINTERCEPTKEYACTIONS>(rConfig));
 				cfgShellExt.SetInterceptCtxMenuActions(GetPropValue<PP_SHINTERCEPTCTXMENUACTIONS>(rConfig));
 
-				TShellMenuItemPtr spRootItem = cfgShellExt.GetCommandRoot();
+				cfgShellExt.GetFormatter()->SetValues(
+					GetResManager().LoadString(IDS_BYTE_STRING),
+					GetResManager().LoadString(IDS_KBYTE_STRING),
+					GetResManager().LoadString(IDS_MBYTE_STRING),
+					GetResManager().LoadString(IDS_GBYTE_STRING),
+					GetResManager().LoadString(IDS_TBYTE_STRING)
+					);
 
-				// what kind of menu ?
-				switch(wParam)
-				{
-				case eLocation_DragAndDropMenu:
-					{
-						bool bAddedAnyOption = false;
-						if(GetPropValue<PP_SHSHOWCOPY>(rConfig))
-						{
-							spRootItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUCOPY_STRING), rResManager.LoadString(IDS_MENUTIPCOPY_STRING),
-								TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy),
-								TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeIDataObject),
-								TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializePidlFolder, chcore::TSmartPath()), false, chcore::eOperation_Copy));
-							bAddedAnyOption = true;
-						}
+				cfgShellExt.SetShowFreeSpace(GetPropValue<PP_SHSHOWFREESPACE>(rConfig));
 
-						if(GetPropValue<PP_SHSHOWMOVE>(rConfig))
-						{
-							spRootItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUMOVE_STRING), rResManager.LoadString(IDS_MENUTIPMOVE_STRING),
-								TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Move),
-								TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeIDataObject),
-								TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializePidlFolder, chcore::TSmartPath()), false, chcore::eOperation_Move));
-							bAddedAnyOption = true;
-						}
+				PrepareDragAndDropMenuItems(cfgShellExt);
+				PrepareNormalMenuItems(cfgShellExt);
 
-						if(GetPropValue<PP_SHSHOWCOPYMOVE>(rConfig))
-						{
-							spRootItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUCOPYMOVESPECIAL_STRING), rResManager.LoadString(IDS_MENUTIPCOPYMOVESPECIAL_STRING),
-								TOperationTypeInfo(TOperationTypeInfo::eOpType_Autodetect, chcore::eOperation_Copy),
-								TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeIDataObject),
-								TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializePidlFolder, chcore::TSmartPath()), true));
-							bAddedAnyOption = true;
-						}
-
-						if(bAddedAnyOption)
-						{
-							// insert separator as an addition to other items
-							spRootItem->AddChild(std::make_shared<TShellMenuItem>());
-						}
-						break;
-					}
-
-				case eLocation_ContextMenu:
-					{
-						if(GetPropValue<PP_SHSHOWPASTE>(rConfig))
-						{
-							spRootItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUPASTE_STRING), rResManager.LoadString(IDS_MENUTIPPASTE_STRING),
-								TOperationTypeInfo(TOperationTypeInfo::eOpType_Autodetect, chcore::eOperation_Copy),
-								TSourcePathsInfo(TSourcePathsInfo::eSrcType_Clipboard),
-								TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializeAuto, chcore::TSmartPath()), false));
-						}
-
-						if(GetPropValue<PP_SHSHOWPASTESPECIAL>(rConfig))
-						{
-							spRootItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUPASTESPECIAL_STRING), rResManager.LoadString(IDS_MENUTIPPASTESPECIAL_STRING),
-								TOperationTypeInfo(TOperationTypeInfo::eOpType_Autodetect, chcore::eOperation_Copy),
-								TSourcePathsInfo(TSourcePathsInfo::eSrcType_Clipboard),
-								TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializeAuto, chcore::TSmartPath()), true));
-						}
-
-						if(GetPropValue<PP_SHSHOWCOPYTO>(rConfig) || GetPropValue<PP_SHSHOWMOVETO>(rConfig) || GetPropValue<PP_SHSHOWCOPYMOVETO>(rConfig))
-						{
-							// prepare shortcuts for all menu options
-							std::vector<CString> vShortcutStrings;
-							GetPropValue<PP_SHORTCUTS>(rConfig, vShortcutStrings);
-
-							bool bRetrieveFreeSpace = GetPropValue<PP_SHSHOWFREESPACE>(rConfig);
-
-							std::vector<CShortcut> vShortcuts;
-
-							for(const CString& strShortcutString : vShortcutStrings)
-							{
-								CShortcut tShortcut;
-								if(tShortcut.FromString(strShortcutString))
-								{
-									unsigned long long ullSize = 0;
-
-									// retrieving free space might fail, but it's not critical - we just won't show the free space
-									if(bRetrieveFreeSpace && GetDynamicFreeSpace(tShortcut.m_strPath, &ullSize, nullptr))
-									{
-										CString strNameFormat;
-										strNameFormat.Format(_T("%s (%s)"), tShortcut.m_strName, GetSizeString(ullSize));
-
-										tShortcut.m_strName = strNameFormat;
-									}
-
-									vShortcuts.push_back(tShortcut);
-								}
-								else
-									BOOST_ASSERT(false);	// non-critical, but not very nice
-							}
-
-							if(GetPropValue<PP_SHSHOWCOPYTO>(rConfig))
-							{
-								std::shared_ptr<TShellMenuItem> menuItem(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUCOPYTO_STRING), rResManager.LoadString(IDS_MENUTIPCOPYTO_STRING)));
-								for(const CShortcut& tShortcut : vShortcuts)
-								{
-									menuItem->AddChild(std::make_shared<TShellMenuItem>((PCTSTR)tShortcut.m_strName, (PCTSTR)tShortcut.m_strPath,
-										TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy),
-										TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto),
-										TDestinationPathInfo(TDestinationPathInfo::eDstType_Specified, chcore::PathFromString((PCTSTR)tShortcut.m_strPath)), false));
-								}
-
-								spRootItem->AddChild(menuItem);
-
-								// optionally separator
-								if(!vShortcuts.empty())
-									menuItem->AddChild(std::make_shared<TShellMenuItem>());
-
-								// "Choose" menu option
-								menuItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_STRING), rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_TOOLTIP_STRING),
-									TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy),
-									TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto),
-									TDestinationPathInfo(TDestinationPathInfo::eDstType_Choose, chcore::TSmartPath()), false));
-							}
-
-							if(GetPropValue<PP_SHSHOWMOVETO>(rConfig))
-							{
-								std::shared_ptr<TShellMenuItem> menuItem(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUMOVETO_STRING), rResManager.LoadString(IDS_MENUTIPMOVETO_STRING)));
-								for(const CShortcut& tShortcut : vShortcuts)
-								{
-									menuItem->AddChild(std::make_shared<TShellMenuItem>((PCTSTR)tShortcut.m_strName, (PCTSTR)tShortcut.m_strPath,
-										TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Move),
-										TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto),
-										TDestinationPathInfo(TDestinationPathInfo::eDstType_Specified, chcore::PathFromString((PCTSTR)tShortcut.m_strPath)), false));
-								}
-
-								spRootItem->AddChild(menuItem);
-
-								// optionally separator
-								if(!vShortcuts.empty())
-									menuItem->AddChild(std::make_shared<TShellMenuItem>());
-
-								// "Choose" menu option
-								menuItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_STRING), rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_TOOLTIP_STRING),
-									TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Move),
-									TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto),
-									TDestinationPathInfo(TDestinationPathInfo::eDstType_Choose, chcore::TSmartPath()), false));
-							}
-
-							if(GetPropValue<PP_SHSHOWCOPYMOVETO>(rConfig))
-							{
-								std::shared_ptr<TShellMenuItem> menuItem(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUCOPYMOVETOSPECIAL_STRING), rResManager.LoadString(IDS_MENUTIPCOPYMOVETOSPECIAL_STRING)));
-								for(const CShortcut& tShortcut : vShortcuts)
-								{
-									menuItem->AddChild(std::make_shared<TShellMenuItem>((PCTSTR)tShortcut.m_strName, (PCTSTR)tShortcut.m_strPath,
-										TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy),
-										TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto),
-										TDestinationPathInfo(TDestinationPathInfo::eDstType_Specified, chcore::PathFromString((PCTSTR)tShortcut.m_strPath)), true));
-								}
-
-								spRootItem->AddChild(menuItem);
-
-								// optionally separator
-								if(!vShortcuts.empty())
-									menuItem->AddChild(std::make_shared<TShellMenuItem>());
-
-								// "Choose" menu option
-								menuItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_STRING), rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_TOOLTIP_STRING),
-									TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy),
-									TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto),
-									TDestinationPathInfo(TDestinationPathInfo::eDstType_Choose, chcore::TSmartPath()), true));
-							}
-						}
-
-						break;
-					}
-
-				default:
-					ASSERT(false);	// unhandled case
-				}
-
 				chcore::TConfig cfgStorage;
 				chcore::TString wstrData;
 
@@ -957,6 +794,160 @@
 	return CWnd::WindowProc(message, wParam, lParam);
 }
 
+void CMainWnd::PrepareDragAndDropMenuItems(TShellExtMenuConfig &cfgShellExt) const
+{
+	chcore::TConfig& rConfig = GetConfig();
+	ictranslate::CResourceManager& rResManager = GetResManager();
+
+	TShellMenuItemPtr spDragAndDropRootItem = cfgShellExt.GetDragAndDropRoot();
+	bool bAddedAnyOption = false;
+	if(GetPropValue<PP_SHSHOWCOPY>(rConfig))
+	{
+		spDragAndDropRootItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUCOPY_STRING), rResManager.LoadString(IDS_MENUTIPCOPY_STRING),
+			TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy),
+			TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeIDataObject),
+			TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializePidlFolder, chcore::TSmartPath()), false, chcore::eOperation_Copy));
+		bAddedAnyOption = true;
+	}
+
+	if(GetPropValue<PP_SHSHOWMOVE>(rConfig))
+	{
+		spDragAndDropRootItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUMOVE_STRING), rResManager.LoadString(IDS_MENUTIPMOVE_STRING),
+			TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Move),
+			TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeIDataObject),
+			TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializePidlFolder, chcore::TSmartPath()), false, chcore::eOperation_Move));
+		bAddedAnyOption = true;
+	}
+
+	if(GetPropValue<PP_SHSHOWCOPYMOVE>(rConfig))
+	{
+		spDragAndDropRootItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUCOPYMOVESPECIAL_STRING), rResManager.LoadString(IDS_MENUTIPCOPYMOVESPECIAL_STRING),
+			TOperationTypeInfo(TOperationTypeInfo::eOpType_Autodetect, chcore::eOperation_Copy),
+			TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeIDataObject),
+			TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializePidlFolder, chcore::TSmartPath()), true));
+		bAddedAnyOption = true;
+	}
+
+	if(bAddedAnyOption)
+	{
+		// insert separator as an addition to other items
+		spDragAndDropRootItem->AddChild(std::make_shared<TShellMenuItem>());
+	}
+}
+
+void CMainWnd::PrepareNormalMenuItems(TShellExtMenuConfig &cfgShellExt) const
+{
+	chcore::TConfig& rConfig = GetConfig();
+	ictranslate::CResourceManager& rResManager = GetResManager();
+
+	TShellMenuItemPtr spNormalRootItem = cfgShellExt.GetNormalRoot();
+
+	if(GetPropValue<PP_SHSHOWPASTE>(rConfig))
+	{
+		spNormalRootItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUPASTE_STRING), rResManager.LoadString(IDS_MENUTIPPASTE_STRING),
+			TOperationTypeInfo(TOperationTypeInfo::eOpType_Autodetect, chcore::eOperation_Copy),
+			TSourcePathsInfo(TSourcePathsInfo::eSrcType_Clipboard),
+			TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializeAuto, chcore::TSmartPath()), false));
+	}
+
+	if(GetPropValue<PP_SHSHOWPASTESPECIAL>(rConfig))
+	{
+		spNormalRootItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUPASTESPECIAL_STRING), rResManager.LoadString(IDS_MENUTIPPASTESPECIAL_STRING),
+			TOperationTypeInfo(TOperationTypeInfo::eOpType_Autodetect, chcore::eOperation_Copy),
+			TSourcePathsInfo(TSourcePathsInfo::eSrcType_Clipboard),
+			TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializeAuto, chcore::TSmartPath()), true));
+	}
+
+	if(GetPropValue<PP_SHSHOWCOPYTO>(rConfig) || GetPropValue<PP_SHSHOWMOVETO>(rConfig) || GetPropValue<PP_SHSHOWCOPYMOVETO>(rConfig))
+	{
+		// prepare shortcuts for all menu options
+		std::vector<CString> vShortcutStrings;
+		GetPropValue<PP_SHORTCUTS>(rConfig, vShortcutStrings);
+
+		std::vector<CShortcut> vShortcuts;
+
+		for(const CString& strShortcutString : vShortcutStrings)
+		{
+			CShortcut tShortcut;
+			if(tShortcut.FromString(strShortcutString))
+				vShortcuts.push_back(tShortcut);
+			else
+				BOOST_ASSERT(false);	// non-critical, but not very nice
+		}
+
+		if(GetPropValue<PP_SHSHOWCOPYTO>(rConfig))
+		{
+			std::shared_ptr<TShellMenuItem> menuItem(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUCOPYTO_STRING), rResManager.LoadString(IDS_MENUTIPCOPYTO_STRING)));
+			for(const CShortcut& tShortcut : vShortcuts)
+			{
+				menuItem->AddChild(std::make_shared<TShellMenuItem>((PCTSTR)tShortcut.m_strName, (PCTSTR)tShortcut.m_strPath,
+					TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy),
+					TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto),
+					TDestinationPathInfo(TDestinationPathInfo::eDstType_Specified, chcore::PathFromString((PCTSTR)tShortcut.m_strPath)), false));
+			}
+
+			spNormalRootItem->AddChild(menuItem);
+
+			// optionally separator
+			if(!vShortcuts.empty())
+				menuItem->AddChild(std::make_shared<TShellMenuItem>());
+
+			// "Choose" menu option
+			menuItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_STRING), rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_TOOLTIP_STRING),
+				TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy),
+				TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto),
+				TDestinationPathInfo(TDestinationPathInfo::eDstType_Choose, chcore::TSmartPath()), false));
+		}
+
+		if(GetPropValue<PP_SHSHOWMOVETO>(rConfig))
+		{
+			std::shared_ptr<TShellMenuItem> menuItem(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUMOVETO_STRING), rResManager.LoadString(IDS_MENUTIPMOVETO_STRING)));
+			for(const CShortcut& tShortcut : vShortcuts)
+			{
+				menuItem->AddChild(std::make_shared<TShellMenuItem>((PCTSTR)tShortcut.m_strName, (PCTSTR)tShortcut.m_strPath,
+					TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Move),
+					TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto),
+					TDestinationPathInfo(TDestinationPathInfo::eDstType_Specified, chcore::PathFromString((PCTSTR)tShortcut.m_strPath)), false));
+			}
+
+			spNormalRootItem->AddChild(menuItem);
+
+			// optionally separator
+			if(!vShortcuts.empty())
+				menuItem->AddChild(std::make_shared<TShellMenuItem>());
+
+			// "Choose" menu option
+			menuItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_STRING), rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_TOOLTIP_STRING),
+				TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Move),
+				TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto),
+				TDestinationPathInfo(TDestinationPathInfo::eDstType_Choose, chcore::TSmartPath()), false));
+		}
+
+		if(GetPropValue<PP_SHSHOWCOPYMOVETO>(rConfig))
+		{
+			std::shared_ptr<TShellMenuItem> menuItem(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_MENUCOPYMOVETOSPECIAL_STRING), rResManager.LoadString(IDS_MENUTIPCOPYMOVETOSPECIAL_STRING)));
+			for(const CShortcut& tShortcut : vShortcuts)
+			{
+				menuItem->AddChild(std::make_shared<TShellMenuItem>((PCTSTR)tShortcut.m_strName, (PCTSTR)tShortcut.m_strPath,
+					TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy),
+					TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto),
+					TDestinationPathInfo(TDestinationPathInfo::eDstType_Specified, chcore::PathFromString((PCTSTR)tShortcut.m_strPath)), true));
+			}
+
+			spNormalRootItem->AddChild(menuItem);
+
+			// optionally separator
+			if(!vShortcuts.empty())
+				menuItem->AddChild(std::make_shared<TShellMenuItem>());
+
+			// "Choose" menu option
+			menuItem->AddChild(std::make_shared<TShellMenuItem>(rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_STRING), rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_TOOLTIP_STRING),
+				TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy),
+				TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto),
+				TDestinationPathInfo(TDestinationPathInfo::eDstType_Choose, chcore::TSmartPath()), true));
+		}
+	}
+}
 void CMainWnd::OnAppAbout() 
 {
 	CAboutDlg *pdlg=new CAboutDlg;
Index: src/ch/MainWnd.h
===================================================================
diff -u -r12b36349f6214befeace08efa9acc7e03be0d847 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/ch/MainWnd.h	(.../MainWnd.h)	(revision 12b36349f6214befeace08efa9acc7e03be0d847)
+++ src/ch/MainWnd.h	(.../MainWnd.h)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -24,6 +24,7 @@
 #include "../libchcore/TTaskManager.h"
 #include "../libchcore/TSharedMemory.h"
 
+class TShellExtMenuConfig;
 class CMiniViewDlg;
 class CStatusDlg;
 
@@ -40,6 +41,9 @@
 protected:
 	virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
 
+	void PrepareDragAndDropMenuItems(TShellExtMenuConfig &cfgShellExt) const;
+	void PrepareNormalMenuItems(TShellExtMenuConfig &cfgShellExt) const;
+
 	BOOL RegisterClass();
 	int ShowTrayIcon();
 	void ShowStatusWindow(const chcore::TTaskPtr& spSelect = chcore::TTaskPtr());
Index: src/ch/ch.vc140.vcxproj
===================================================================
diff -u -rf0b3178897bcff99beb7fde44dfe952ccbf40bec -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/ch/ch.vc140.vcxproj	(.../ch.vc140.vcxproj)	(revision f0b3178897bcff99beb7fde44dfe952ccbf40bec)
+++ src/ch/ch.vc140.vcxproj	(.../ch.vc140.vcxproj)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -530,7 +530,6 @@
     <ClInclude Include="AppHelper.h" />
     <ClInclude Include="CfgProperties.h" />
     <ClInclude Include="ClipboardMonitor.h" />
-    <ClInclude Include="FileSupport.h" />
     <ClInclude Include="shortcuts.h" />
     <ClInclude Include="StringHelpers.h" />
     <ClInclude Include="TMsgBox.h" />
@@ -780,7 +779,6 @@
     <ClCompile Include="structs.cpp" />
     <ClCompile Include="AppHelper.cpp" />
     <ClCompile Include="ClipboardMonitor.cpp" />
-    <ClCompile Include="FileSupport.cpp" />
     <ClCompile Include="shortcuts.cpp" />
     <ClCompile Include="StringHelpers.cpp" />
     <ClCompile Include="TMsgBox.cpp" />
Index: src/ch/ch.vc140.vcxproj.filters
===================================================================
diff -u -rcca174e74e108de1f5729e4cc6c46d2b9a5e25a7 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/ch/ch.vc140.vcxproj.filters	(.../ch.vc140.vcxproj.filters)	(revision cca174e74e108de1f5729e4cc6c46d2b9a5e25a7)
+++ src/ch/ch.vc140.vcxproj.filters	(.../ch.vc140.vcxproj.filters)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -92,9 +92,6 @@
     <ClInclude Include="ClipboardMonitor.h">
       <Filter>Source Files\Tools</Filter>
     </ClInclude>
-    <ClInclude Include="FileSupport.h">
-      <Filter>Source Files\Tools</Filter>
-    </ClInclude>
     <ClInclude Include="shortcuts.h">
       <Filter>Source Files\Tools</Filter>
     </ClInclude>
@@ -262,9 +259,6 @@
     <ClCompile Include="ClipboardMonitor.cpp">
       <Filter>Source Files\Tools</Filter>
     </ClCompile>
-    <ClCompile Include="FileSupport.cpp">
-      <Filter>Source Files\Tools</Filter>
-    </ClCompile>
     <ClCompile Include="shortcuts.cpp">
       <Filter>Source Files\Tools</Filter>
     </ClCompile>
Index: src/chext/DropMenuExt.cpp
===================================================================
diff -u -r2f696d06139af4d0fab14dd1613507b66f5169cb -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/chext/DropMenuExt.cpp	(.../DropMenuExt.cpp)	(revision 2f696d06139af4d0fab14dd1613507b66f5169cb)
+++ src/chext/DropMenuExt.cpp	(.../DropMenuExt.cpp)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -22,7 +22,6 @@
 #include "../Common/ipcstructs.h"
 #include "../libchcore/TTaskDefinition.h"
 #include <boost/shared_array.hpp>
-#include "ShellPathsHelpers.h"
 #include "../common/TShellExtMenuConfig.h"
 #include "../libchcore/TSharedMemory.h"
 #include "Logger.h"
@@ -79,7 +78,7 @@
 	if(hWnd == nullptr)
 		return E_FAIL;
 
-	HRESULT hResult = ShellExtensionVerifier::ReadShellConfig(m_piShellExtControl, m_tShellExtMenuConfig, eLocation_DragAndDropMenu);
+	HRESULT hResult = ShellExtensionVerifier::ReadShellConfig(m_piShellExtControl, m_tShellExtMenuConfig);
 	LOG_HRESULT(m_spLog, hResult) << L"Read shell config";
 	if(SUCCEEDED(hResult))
 	{
@@ -110,8 +109,9 @@
 						m_tShellExtMenuConfig.GetInterceptKeyboardActions() && eActionSource == TShellExtData::eSrc_Keyboard ||
 						m_tShellExtMenuConfig.GetInterceptCtxMenuActions() && eActionSource == TShellExtData::eSrc_CtxMenu);
 
-	TShellMenuItemPtr spRootMenuItem = m_tShellExtMenuConfig.GetCommandRoot();
-	m_tContextMenuHandler.Init(spRootMenuItem, hMenu, idCmdFirst, indexMenu, m_tShellExtData, m_tShellExtMenuConfig.GetShowShortcutIcons(), bIntercept);
+	TShellMenuItemPtr spRootMenuItem = m_tShellExtMenuConfig.GetDragAndDropRoot();
+	m_tContextMenuHandler.Init(spRootMenuItem, hMenu, idCmdFirst, indexMenu, m_tShellExtData, m_tShellExtMenuConfig.GetFormatter(), 
+		m_tShellExtMenuConfig.GetShowFreeSpace(), m_tShellExtMenuConfig.GetShowShortcutIcons(), bIntercept);
 
 	return MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, m_tContextMenuHandler.GetLastCommandID() - idCmdFirst + 1);
 }
Index: src/chext/Logger.cpp
===================================================================
diff -u -rebc7fabbd2d59f9a0f723ea480b5374cc393ec12 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/chext/Logger.cpp	(.../Logger.cpp)	(revision ebc7fabbd2d59f9a0f723ea480b5374cc393ec12)
+++ src/chext/Logger.cpp	(.../Logger.cpp)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -93,6 +93,11 @@
 
 logger::TLoggerPtr GetLogger(PCTSTR pszChannel)
 {
+	return logger::MakeLogger(GetLogFileData(), pszChannel);
+}
+
+logger::TLogFileDataPtr GetLogFileData()
+{
 	static logger::TLogFileDataPtr spLogFileData = CreateLoggerData();
-	return logger::MakeLogger(spLogFileData, pszChannel);
+	return spLogFileData;
 }
Index: src/chext/Logger.h
===================================================================
diff -u -rebc7fabbd2d59f9a0f723ea480b5374cc393ec12 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/chext/Logger.h	(.../Logger.h)	(revision ebc7fabbd2d59f9a0f723ea480b5374cc393ec12)
+++ src/chext/Logger.h	(.../Logger.h)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -33,6 +33,7 @@
 }
 
 logger::TLoggerPtr GetLogger(PCTSTR pszChannel);
+logger::TLogFileDataPtr GetLogFileData();
 
 #define LOG_HRESULT(lg, hr)\
 	LOG(lg, details::HRESULT2Severity(hr)) << L" <" << HResultFormatter::FormatHResult(hr) << L"> "
Index: src/chext/MenuExt.cpp
===================================================================
diff -u -r2f696d06139af4d0fab14dd1613507b66f5169cb -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/chext/MenuExt.cpp	(.../MenuExt.cpp)	(revision 2f696d06139af4d0fab14dd1613507b66f5169cb)
+++ src/chext/MenuExt.cpp	(.../MenuExt.cpp)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -81,7 +81,7 @@
 	if(!hWnd)
 		return S_OK;
 
-	HRESULT hResult = ShellExtensionVerifier::ReadShellConfig(m_piShellExtControl, m_tShellExtMenuConfig, eLocation_ContextMenu);
+	HRESULT hResult = ShellExtensionVerifier::ReadShellConfig(m_piShellExtControl, m_tShellExtMenuConfig);
 	LOG_HRESULT(m_spLog, hResult) << L"Read shell config";
 
 	if(SUCCEEDED(hResult))
@@ -143,8 +143,9 @@
 	}
 
 	// main command adding
-	TShellMenuItemPtr spRootMenuItem = m_tShellExtMenuConfig.GetCommandRoot();
-	m_tContextMenuHandler.Init(spRootMenuItem, hMenu, idCmdFirst, indexMenu, m_tShellExtData, m_tShellExtMenuConfig.GetShowShortcutIcons(), false);
+	TShellMenuItemPtr spRootMenuItem = m_tShellExtMenuConfig.GetNormalRoot();
+	m_tContextMenuHandler.Init(spRootMenuItem, hMenu, idCmdFirst, indexMenu, m_tShellExtData, m_tShellExtMenuConfig.GetFormatter(), 
+		m_tShellExtMenuConfig.GetShowFreeSpace(), m_tShellExtMenuConfig.GetShowShortcutIcons(), false);
 
 	return MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, m_tContextMenuHandler.GetLastCommandID() - idCmdFirst + 1);
 }
@@ -246,9 +247,8 @@
 
 			HFONT hOldFont = (HFONT)SelectObject(hDC, hFont);
 
-			// calc text size
-			SIZE size;
-			GetTextExtentPoint32(hDC, spSelectedItem->GetName().c_str(), boost::numeric_cast<int>(spSelectedItem->GetName().GetLength()), &size);
+			SIZE size = { 0 };
+			GetTextExtentPoint32(hDC, spSelectedItem->GetLocalName().c_str(), boost::numeric_cast<int>(spSelectedItem->GetLocalName().GetLength()), &size);
 
 			// restore old settings
 			SelectObject(hDC, hOldFont);
@@ -257,7 +257,7 @@
 
 			// set
 			lpmis->itemWidth = size.cx + GetSystemMetrics(SM_CXMENUCHECK) + 2 * GetSystemMetrics(SM_CXSMICON);
-			lpmis->itemHeight = __max(size.cy + 3, GetSystemMetrics(SM_CYMENU) + 3);
+			lpmis->itemHeight = std::max<int>(size.cy + 3, GetSystemMetrics(SM_CYMENU) + 3);
 
 			break;
 		}
@@ -325,7 +325,7 @@
 	rcText.right = lpdis->rcItem.right;
 	rcText.bottom = lpdis->rcItem.bottom;
 
-	DrawText(lpdis->hDC, spSelectedItem->GetName().c_str(), -1, &rcText, DT_LEFT | DT_SINGLELINE | DT_VCENTER);
+	DrawText(lpdis->hDC, spSelectedItem->GetLocalName().c_str(), -1, &rcText, DT_LEFT | DT_SINGLELINE | DT_VCENTER);
 
 	return S_OK;
 }
Index: src/chext/ShellExtensionVerifier.cpp
===================================================================
diff -u -r2f696d06139af4d0fab14dd1613507b66f5169cb -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/chext/ShellExtensionVerifier.cpp	(.../ShellExtensionVerifier.cpp)	(revision 2f696d06139af4d0fab14dd1613507b66f5169cb)
+++ src/chext/ShellExtensionVerifier.cpp	(.../ShellExtensionVerifier.cpp)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -63,7 +63,7 @@
 	return S_FALSE;
 }
 
-HRESULT ShellExtensionVerifier::ReadShellConfig(IShellExtControl* piShellExtControl, TShellExtMenuConfig& tShellExtConfig, ELocation eLocation)
+HRESULT ShellExtensionVerifier::ReadShellConfig(IShellExtControl* piShellExtControl, TShellExtMenuConfig& tShellExtConfig)
 {
 	logger::TLoggerPtr spLogger = GetLogger(L"ShellExtVerifier");
 	try
@@ -82,7 +82,7 @@
 
 		LOG_DEBUG(spLogger) << L"Requesting CH configuration. Shared memory identifier " << uiSHMID;
 
-		if(::SendMessage(hWnd, WM_GETCONFIG, eLocation, uiSHMID) != TRUE)
+		if(::SendMessage(hWnd, WM_GETCONFIG, 0, uiSHMID) != TRUE)
 		{
 			LOG_ERROR(spLogger) << L"Failed to retrieve configuration from Copy Handler";
 			return E_FAIL;
Index: src/chext/ShellExtensionVerifier.h
===================================================================
diff -u -r2f696d06139af4d0fab14dd1613507b66f5169cb -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/chext/ShellExtensionVerifier.h	(.../ShellExtensionVerifier.h)	(revision 2f696d06139af4d0fab14dd1613507b66f5169cb)
+++ src/chext/ShellExtensionVerifier.h	(.../ShellExtensionVerifier.h)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -29,7 +29,7 @@
 public:
 	static HWND VerifyShellExt(IShellExtControl* piShellExtControl);
 	static HRESULT IsShellExtEnabled(IShellExtControl* piShellExtControl);
-	static HRESULT ReadShellConfig(IShellExtControl* piShellExtControl, TShellExtMenuConfig& tShellExtConfig, ELocation eLocation);
+	static HRESULT ReadShellConfig(IShellExtControl* piShellExtControl, TShellExtMenuConfig& tShellExtConfig);
 };
 
 #endif
Index: src/chext/TContextMenuHandler.cpp
===================================================================
diff -u -r8a2ff3b2b71b45fb525e030167e62f316cb32869 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/chext/TContextMenuHandler.cpp	(.../TContextMenuHandler.cpp)	(revision 8a2ff3b2b71b45fb525e030167e62f316cb32869)
+++ src/chext/TContextMenuHandler.cpp	(.../TContextMenuHandler.cpp)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -23,11 +23,13 @@
 #include "stdafx.h"
 #include "TContextMenuHandler.h"
 #include "../common/TShellExtMenuConfig.h"
+#include "Logger.h"
 
 TContextMenuHandler::TContextMenuHandler() :
 	m_uiNextMenuID(0),
 	m_uiFirstMenuID(0),
-	m_bEnableOwnerDrawnPaths(false)
+	m_bEnableOwnerDrawnPaths(false),
+	m_fsLocal(GetLogFileData())
 {
 }
 
@@ -36,18 +38,20 @@
 	Clear();
 }
 
-void TContextMenuHandler::Init(const TShellMenuItemPtr& spRootMenuItem, HMENU hMenu, UINT uiFirstItemID, UINT uiFirstItemPosition, const TShellExtData& rShellExtData, bool bEnableOwnerDrawnPaths, bool bOverrideDefaultItem)
+void TContextMenuHandler::Init(const TShellMenuItemPtr& spRootMenuItem, HMENU hMenu, UINT uiFirstItemID, UINT uiFirstItemPosition, const TShellExtData& rShellExtData,
+	const chcore::TSizeFormatterPtr& spFormatter, bool bShowFreeSpace, bool bEnableOwnerDrawnPaths, bool bOverrideDefaultItem)
 {
 	Clear();
 
 	m_uiFirstMenuID = uiFirstItemID;
 	m_uiNextMenuID = uiFirstItemID;
 	m_bEnableOwnerDrawnPaths = bEnableOwnerDrawnPaths;
 
-	UpdateMenuRecursive(spRootMenuItem, hMenu, uiFirstItemPosition, rShellExtData, bOverrideDefaultItem);
+	UpdateMenuRecursive(spRootMenuItem, hMenu, uiFirstItemPosition, rShellExtData, spFormatter, bShowFreeSpace, bOverrideDefaultItem);
 }
 
-void TContextMenuHandler::UpdateMenuRecursive(const TShellMenuItemPtr& spRootMenuItem, HMENU hMenu, UINT uiFirstItemPosition, const TShellExtData& rShellExtData, bool bOverrideDefaultItem)
+void TContextMenuHandler::UpdateMenuRecursive(const TShellMenuItemPtr& spRootMenuItem, HMENU hMenu, UINT uiFirstItemPosition,
+	const TShellExtData& rShellExtData, const chcore::TSizeFormatterPtr& spFormatter, bool bShowFreeSpace, bool bOverrideDefaultItem)
 {
 	for(size_t stIndex = 0; stIndex < spRootMenuItem->GetChildrenCount(); ++stIndex)
 	{
@@ -58,7 +62,7 @@
 			{
 				// special handling
 				HMENU hSubMenu = CreatePopupMenu();
-				UpdateMenuRecursive(spMenuItem, hSubMenu, 0, rShellExtData, bOverrideDefaultItem);
+				UpdateMenuRecursive(spMenuItem, hSubMenu, 0, rShellExtData, spFormatter, bShowFreeSpace, bOverrideDefaultItem);
 
 				MENUITEMINFO mii;
 				mii.cbSize = sizeof(MENUITEMINFO);
@@ -67,7 +71,7 @@
 				mii.fState = (spRootMenuItem->GetChildrenCount() > 0) ? MFS_ENABLED : MFS_GRAYED;
 				mii.wID = m_uiNextMenuID++;
 				mii.hSubMenu = hSubMenu;
-				mii.dwTypeData = (PTSTR)spMenuItem->GetName().c_str();
+				mii.dwTypeData = (PTSTR)spMenuItem->GetLocalName().c_str();
 				mii.cch = 0;
 
 				::InsertMenuItem(hMenu, uiFirstItemPosition++, TRUE, &mii);
@@ -83,8 +87,11 @@
 				bool bEnableOwnerDrawnItem = m_bEnableOwnerDrawnPaths && spMenuItem->SpecifiesDestinationPath();
 				bool bEnableItem = rShellExtData.VerifyItemCanBeExecuted(spMenuItem);
 
-				::InsertMenu(hMenu, uiFirstItemPosition++, MF_BYPOSITION | MF_STRING | (bEnableItem ? MF_ENABLED : MF_GRAYED) | (bEnableOwnerDrawnItem ? MF_OWNERDRAW : 0), m_uiNextMenuID, spMenuItem->GetName().c_str());
+				std::wstring wstrItemName = GetDisplayText(spMenuItem, spFormatter, bShowFreeSpace);
 
+				::InsertMenu(hMenu, uiFirstItemPosition++, MF_BYPOSITION | MF_STRING | (bEnableItem ? MF_ENABLED : MF_GRAYED) | (bEnableOwnerDrawnItem ? MF_OWNERDRAW : 0),
+					m_uiNextMenuID, wstrItemName.c_str());
+
 				if(bOverrideDefaultItem && rShellExtData.IsDefaultItem(spMenuItem))
 					::SetMenuDefaultItem(hMenu, m_uiNextMenuID, FALSE);
 				++m_uiNextMenuID;
@@ -98,6 +105,35 @@
 	}
 }
 
+std::wstring TContextMenuHandler::GetDisplayText(const TShellMenuItemPtr& spMenuItem, const chcore::TSizeFormatterPtr& spFormatter, bool bShowFreeSpace)
+{
+	std::wstring wstrItemName = spMenuItem->GetLocalName(false).c_str();
+
+	if(wstrItemName.empty())
+	{
+		wstrItemName = spMenuItem->GetName().c_str();
+
+		if(bShowFreeSpace && spMenuItem->SpecifiesDestinationPath())
+		{
+			unsigned long long ullSize = 0, ullTotal = 0;
+			try
+			{
+				m_fsLocal.GetDynamicFreeSpace(spMenuItem->GetDestinationPathInfo().GetDefaultDestinationPath(), ullSize, ullTotal);
+
+				wstrItemName += std::wstring(L" (") + spFormatter->GetSizeString(ullSize) + L")";
+				spMenuItem->SetLocalName(wstrItemName.c_str());
+			}
+			catch(const std::exception&)
+			{
+			}
+		}
+		else
+			spMenuItem->SetLocalName(wstrItemName.c_str());
+	}
+
+	return wstrItemName;
+}
+
 void TContextMenuHandler::Clear()
 {
 	m_mapMenuItems.clear();
Index: src/chext/TContextMenuHandler.h
===================================================================
diff -u -r4fe995b304ea342b50293f92d3c1992b43b820f7 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/chext/TContextMenuHandler.h	(.../TContextMenuHandler.h)	(revision 4fe995b304ea342b50293f92d3c1992b43b820f7)
+++ src/chext/TContextMenuHandler.h	(.../TContextMenuHandler.h)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -24,6 +24,8 @@
 #define __TCONTEXTMENUHANDLER_H__
 
 #include "TShellExtData.h"
+#include "../libchcore/TLocalFilesystem.h"
+#include "../libchcore/TSizeFormatter.h"
 
 class TShellMenuItem;
 
@@ -35,15 +37,19 @@
 	TContextMenuHandler();
 	~TContextMenuHandler();
 
-	void Init(const TShellMenuItemPtr& spRootMenuItem, HMENU hMenu, UINT uiFirstItemID, UINT uiFirstItemPosition, const TShellExtData& rShellExtData, bool bEnableOwnerDrawnPaths, bool bOverrideDefaultItem);
+	void Init(const TShellMenuItemPtr& spRootMenuItem, HMENU hMenu, UINT uiFirstItemID, UINT uiFirstItemPosition, const TShellExtData& rShellExtData,
+		const chcore::TSizeFormatterPtr& spFormatter, bool bShowFreeSpace,
+		bool bEnableOwnerDrawnPaths, bool bOverrideDefaultItem);
 	void Clear();
 
 	UINT GetLastCommandID() const { return m_uiNextMenuID; }
 	TShellMenuItemPtr GetCommandByMenuItemOffset(UINT uiOffset);
 	TShellMenuItemPtr GetCommandByItemID(UINT uiOffset);
 
 protected:
-	void UpdateMenuRecursive(const TShellMenuItemPtr& spRootMenuItem, HMENU hMenu, UINT uiFirstItemPosition, const TShellExtData& rShellExtData, bool bOverrideDefaultItem);
+	void UpdateMenuRecursive(const TShellMenuItemPtr& spRootMenuItem, HMENU hMenu, UINT uiFirstItemPosition, const TShellExtData& rShellExtData,
+		const chcore::TSizeFormatterPtr& spFormatter, bool bShowFreeSpace, bool bOverrideDefaultItem);
+	std::wstring GetDisplayText(const TShellMenuItemPtr& spMenuItem, const chcore::TSizeFormatterPtr& spFormatter, bool bShowFreeSpace);
 
 private:
 	std::map<UINT, TShellMenuItemPtr> m_mapMenuItems;
@@ -53,6 +59,6 @@
 	UINT m_uiNextMenuID;		// next menu ID to be used
 
 	bool m_bEnableOwnerDrawnPaths;
+	chcore::TLocalFilesystem m_fsLocal;
 };
-
 #endif
Index: src/common/TShellExtMenuConfig.cpp
===================================================================
diff -u -r8a2ff3b2b71b45fb525e030167e62f316cb32869 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/common/TShellExtMenuConfig.cpp	(.../TShellExtMenuConfig.cpp)	(revision 8a2ff3b2b71b45fb525e030167e62f316cb32869)
+++ src/common/TShellExtMenuConfig.cpp	(.../TShellExtMenuConfig.cpp)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -24,20 +24,26 @@
 #include "TShellExtMenuConfig.h"
 #include "../libchcore/TConfig.h"
 #include "../libchcore/TConfigArray.h"
+#include <memory>
+#include <boost/assert.hpp>
+#include <boost/lexical_cast.hpp>
 
 // helper method for concatenating strings
-PCTSTR Concat(std::wstring& wstrBuffer, PCTSTR pszFirst, PCTSTR pszSecond)
+namespace
 {
-	if(pszFirst && pszFirst[0] != _T('\0'))
+	PCTSTR Concat(std::wstring& wstrBuffer, PCTSTR pszFirst, PCTSTR pszSecond)
 	{
-		wstrBuffer = pszFirst;
-		wstrBuffer += _T(".");
-		wstrBuffer += pszSecond;
-	}
-	else
-		wstrBuffer = pszSecond;
+		if(pszFirst && pszFirst[ 0 ] != _T('\0'))
+		{
+			wstrBuffer = pszFirst;
+			wstrBuffer += _T(".");
+			wstrBuffer += pszSecond;
+		}
+		else
+			wstrBuffer = pszSecond;
 
-	return wstrBuffer.c_str();
+		return wstrBuffer.c_str();
+	}
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////
@@ -243,6 +249,24 @@
 	m_vChildItems.clear();
 }
 
+const chcore::TString& TShellMenuItem::GetName() const
+{
+	return m_strName;
+}
+
+const chcore::TString& TShellMenuItem::GetLocalName(bool bUseFallback) const
+{
+	if(bUseFallback && m_strLocalName.IsEmpty())
+		return m_strName;
+
+	return m_strLocalName;
+}
+
+void TShellMenuItem::SetLocalName(const chcore::TString& strLocalName)
+{
+	m_strLocalName = strLocalName;
+}
+
 void TShellMenuItem::InitSeparatorItem()
 {
 	Clear();
@@ -430,7 +454,9 @@
 	m_bInterceptKeyboardActions(false),
 	m_bInterceptCtxMenuActions(false),
 	m_bShowShortcutIcons(false),
-	m_spCommandsRoot(std::make_shared<TShellMenuItem>(_T(""), _T("")))
+	m_spDragAndDropRoot(std::make_shared<TShellMenuItem>(_T(""), _T(""))),
+	m_spNormalRoot(std::make_shared<TShellMenuItem>(_T(""), _T(""))),
+	m_spFmtSize(std::make_shared<chcore::TSizeFormatter>())
 {
 }
 
@@ -440,7 +466,7 @@
 
 void TShellExtMenuConfig::Clear()
 {
-	m_spCommandsRoot->Clear();
+	m_spDragAndDropRoot->Clear();
 
 	m_bInterceptDragAndDrop = false;
 	m_bInterceptKeyboardActions = false;
@@ -449,20 +475,34 @@
 }
 
 // commands support
-TShellMenuItemPtr TShellExtMenuConfig::GetCommandRoot()
+TShellMenuItemPtr TShellExtMenuConfig::GetDragAndDropRoot()
 {
-	return m_spCommandsRoot;
+	return m_spDragAndDropRoot;
 }
 
+TShellMenuItemPtr TShellExtMenuConfig::GetNormalRoot()
+{
+	return m_spNormalRoot;
+}
+
+chcore::TSizeFormatterPtr TShellExtMenuConfig::GetFormatter() const
+{
+	return m_spFmtSize;
+}
+
 void TShellExtMenuConfig::StoreInConfig(chcore::TConfig& rConfig, PCTSTR pszNodeName) const
 {
 	std::wstring strBuffer;
 	SetConfigValue(rConfig, Concat(strBuffer, pszNodeName, _T("InterceptDragAndDrop")), m_bInterceptDragAndDrop);
 	SetConfigValue(rConfig, Concat(strBuffer, pszNodeName, _T("InterceptKeyboardActions")), m_bInterceptKeyboardActions);
 	SetConfigValue(rConfig, Concat(strBuffer, pszNodeName, _T("InterceptCtxMenuActions")), m_bInterceptCtxMenuActions);
 	SetConfigValue(rConfig, Concat(strBuffer, pszNodeName, _T("ShowShortcutIcons")), m_bShowShortcutIcons);
+	SetConfigValue(rConfig, Concat(strBuffer, pszNodeName, _T("ShowFreeSpace")), m_bShowFreeSpace);
 
-	m_spCommandsRoot->StoreInConfig(rConfig, Concat(strBuffer, pszNodeName, _T("RootItem")));
+	m_spFmtSize->StoreInConfig(rConfig, Concat(strBuffer, pszNodeName, L"Sizes"));
+
+	m_spDragAndDropRoot->StoreInConfig(rConfig, Concat(strBuffer, pszNodeName, _T("DragAndDropRootItem")));
+	m_spNormalRoot->StoreInConfig(rConfig, Concat(strBuffer, pszNodeName, _T("NormalRootItem")));
 }
 
 bool TShellExtMenuConfig::ReadFromConfig(chcore::TConfig& rConfig, PCTSTR pszNodeName)
@@ -478,9 +518,16 @@
 		return false;
 	if(!GetConfigValue(rConfig, Concat(strBuffer, pszNodeName, _T("ShowShortcutIcons")), m_bShowShortcutIcons))
 		return false;
+	if(!GetConfigValue(rConfig, Concat(strBuffer, pszNodeName, _T("ShowFreeSpace")), m_bShowFreeSpace))
+		return false;
 
-	if(!m_spCommandsRoot->ReadFromConfig(rConfig, Concat(strBuffer, pszNodeName, _T("RootItem"))))
+	if(!m_spFmtSize->ReadFromConfig(rConfig, Concat(strBuffer, pszNodeName, L"Sizes")))
 		return false;
 
+	if(!m_spDragAndDropRoot->ReadFromConfig(rConfig, Concat(strBuffer, pszNodeName, _T("DragAndDropRootItem"))))
+		return false;
+	if(!m_spNormalRoot->ReadFromConfig(rConfig, Concat(strBuffer, pszNodeName, _T("NormalRootItem"))))
+		return false;
+
 	return true;
 }
Index: src/common/TShellExtMenuConfig.h
===================================================================
diff -u -r4fe995b304ea342b50293f92d3c1992b43b820f7 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/common/TShellExtMenuConfig.h	(.../TShellExtMenuConfig.h)	(revision 4fe995b304ea342b50293f92d3c1992b43b820f7)
+++ src/common/TShellExtMenuConfig.h	(.../TShellExtMenuConfig.h)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -25,6 +25,8 @@
 
 #include "../libchcore/EOperationTypes.h"
 #include "../libchcore/TPath.h"
+#include <memory>
+#include "../libchcore/TSizeFormatter.h"
 
 namespace chcore { class TConfig; }
 
@@ -154,9 +156,12 @@
 	void Clear();
 
 	// retrieving attributes - common ones
-	const chcore::TString& GetName() const { return m_strName; }
+	const chcore::TString& GetName() const;
 	const chcore::TString& GetItemTip() const { return m_strItemTip; }
 
+	const chcore::TString& GetLocalName(bool bUseFallback = true) const;
+	void SetLocalName(const chcore::TString& strLocalName);
+
 	// retrieving attributes - standard items only
 	const TOperationTypeInfo& GetOperationTypeInfo() const { return m_tOperationType; }
 	const TDestinationPathInfo& GetDestinationPathInfo() const { return m_tDestinationPath; }
@@ -195,6 +200,7 @@
 	EItemType m_eItemType;
 
 	chcore::TString m_strName;
+	chcore::TString m_strLocalName;		// locally updated name; not serialized
 	chcore::TString m_strItemTip;
 
 	// where to get the operation type from? (specified here / autodetect (with fallback specified here))
@@ -224,8 +230,12 @@
 	void Clear();
 
 	// commands support
-	TShellMenuItemPtr GetCommandRoot();
+	TShellMenuItemPtr GetDragAndDropRoot();
+	TShellMenuItemPtr GetNormalRoot();
 
+	// formatter
+	chcore::TSizeFormatterPtr GetFormatter() const;
+
 	// options
 	void SetInterceptDragAndDrop(bool bEnable) { m_bInterceptDragAndDrop = bEnable; }
 	bool GetInterceptDragAndDrop() const { return m_bInterceptDragAndDrop; }
@@ -239,17 +249,24 @@
 	void SetShowShortcutIcons(bool bEnable) { m_bShowShortcutIcons = bEnable; }
 	bool GetShowShortcutIcons() const { return m_bShowShortcutIcons; }
 
+	void SetShowFreeSpace(bool bEnable) { m_bShowFreeSpace = bEnable; }
+	bool GetShowFreeSpace() const { return m_bShowFreeSpace; }
+
 	// serialize/unserialize
 	void StoreInConfig(chcore::TConfig& rConfig, PCTSTR pszNodeName) const;
 	bool ReadFromConfig(chcore::TConfig& rConfig, PCTSTR pszNodeName);
 
 private:
-	TShellMenuItemPtr m_spCommandsRoot;		// root under which there are commands placed
+	TShellMenuItemPtr m_spDragAndDropRoot;		// root under which there are commands placed
+	TShellMenuItemPtr m_spNormalRoot;		// root under which there are commands placed
 
-	bool m_bInterceptDragAndDrop;
-	bool m_bInterceptKeyboardActions;
-	bool m_bInterceptCtxMenuActions;
-	bool m_bShowShortcutIcons;	// show shell icons with shortcuts ?
+	chcore::TSizeFormatterPtr m_spFmtSize;
+
+	bool m_bInterceptDragAndDrop = false;
+	bool m_bInterceptKeyboardActions = false;
+	bool m_bInterceptCtxMenuActions = false;
+	bool m_bShowShortcutIcons = false;	// show shell icons with shortcuts ?
+	bool m_bShowFreeSpace = false;
 };
 
 #endif
Index: src/libchcore/IFilesystem.h
===================================================================
diff -u -rd468098a278a0d16c5b700236ea276b9c9677c9f -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/libchcore/IFilesystem.h	(.../IFilesystem.h)	(revision d468098a278a0d16c5b700236ea276b9c9677c9f)
+++ src/libchcore/IFilesystem.h	(.../IFilesystem.h)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -61,7 +61,7 @@
 
 		virtual EPathsRelation GetPathsRelation(const TSmartPath& pathFirst, const TSmartPath& pathSecond) = 0;
 
-		virtual void GetDynamicFreeSpace(const TSmartPath& path, unsigned long long& rullFree) = 0;
+		virtual void GetDynamicFreeSpace(const TSmartPath& path, unsigned long long& rullFree, unsigned long long& rullTotal) = 0;
 	};
 
 	typedef std::shared_ptr<IFilesystem> IFilesystemPtr;
Index: src/libchcore/TFilesystemFeedbackWrapper.cpp
===================================================================
diff -u -r12b36349f6214befeace08efa9acc7e03be0d847 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/libchcore/TFilesystemFeedbackWrapper.cpp	(.../TFilesystemFeedbackWrapper.cpp)	(revision 12b36349f6214befeace08efa9acc7e03be0d847)
+++ src/libchcore/TFilesystemFeedbackWrapper.cpp	(.../TFilesystemFeedbackWrapper.cpp)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -101,7 +101,7 @@
 
 	TSubTaskBase::ESubOperationResult TFilesystemFeedbackWrapper::CheckForFreeSpaceFB(const TSmartPath& pathFirstSrc, const TSmartPath& pathDestination, unsigned long long ullNeededSize)
 	{
-		unsigned long long ullAvailableSize = 0;
+		unsigned long long ullAvailableSize = 0, ullTotal = 0;
 		TFeedbackResult frResult(eResult_Unknown, false);
 		bool bRetry = false;
 
@@ -116,7 +116,7 @@
 			bool bCheckFailed = false;
 			try
 			{
-				m_spFilesystem->GetDynamicFreeSpace(pathDestination, ullAvailableSize);
+				m_spFilesystem->GetDynamicFreeSpace(pathDestination, ullAvailableSize, ullTotal);
 			}
 			catch (const TFileException& e)
 			{
Index: src/libchcore/TLocalFilesystem.cpp
===================================================================
diff -u -rf8fcbbd1d2321cf0c8be79526c449384af654e49 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/libchcore/TLocalFilesystem.cpp	(.../TLocalFilesystem.cpp)	(revision f8fcbbd1d2321cf0c8be79526c449384af654e49)
+++ src/libchcore/TLocalFilesystem.cpp	(.../TLocalFilesystem.cpp)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -462,7 +462,7 @@
 		return pDiskExtent->DiskNumber;
 	}
 
-	void TLocalFilesystem::GetDynamicFreeSpace(const TSmartPath& path, unsigned long long& rullFree)
+	void TLocalFilesystem::GetDynamicFreeSpace(const TSmartPath& path, unsigned long long& rullFree, unsigned long long& rullTotal)
 	{
 		LOG_DEBUG(m_spLog) << L"Retrieving free space for path " << path;
 
@@ -472,6 +472,7 @@
 		if (GetDiskFreeSpaceEx(path.ToString(), &ui64Available, &ui64Total, nullptr))
 		{
 			rullFree = ui64Available.QuadPart;
+			rullTotal = ui64Total.QuadPart;
 			LOG_DEBUG(m_spLog) << L"Free space for path " << path << L" is " << rullFree;
 		}
 		else
Index: src/libchcore/TLocalFilesystem.h
===================================================================
diff -u -r3c209ebdc14ac0829468249805b7587880761f59 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/libchcore/TLocalFilesystem.h	(.../TLocalFilesystem.h)	(revision 3c209ebdc14ac0829468249805b7587880761f59)
+++ src/libchcore/TLocalFilesystem.h	(.../TLocalFilesystem.h)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -62,7 +62,7 @@
 
 		virtual EPathsRelation GetPathsRelation(const TSmartPath& pathFirst, const TSmartPath& pathSecond) override;
 
-		virtual void GetDynamicFreeSpace(const TSmartPath& path, unsigned long long& rullFree) override;
+		virtual void GetDynamicFreeSpace(const TSmartPath& path, unsigned long long& rullFree, unsigned long long& rullTotal) override;
 
 	private:
 		static TSmartPath PrependPathExtensionIfNeeded(const TSmartPath& pathInput);
Index: src/libchcore/TSizeFormatter.cpp
===================================================================
diff -u
--- src/libchcore/TSizeFormatter.cpp	(revision 0)
+++ src/libchcore/TSizeFormatter.cpp	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -0,0 +1,121 @@
+// ============================================================================
+//  Copyright (C) 2001-2016 by Jozef Starosczyk
+//  ixen@copyhandler.com
+//
+//  This program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU Library General Public License
+//  (version 2) as published by the Free Software Foundation;
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU Library General Public
+//  License along with this program; if not, write to the
+//  Free Software Foundation, Inc.,
+//  59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+// ============================================================================
+#include "stdafx.h"
+#include "TSizeFormatter.h"
+#include "../libchcore/TConfig.h"
+#include <tchar.h>
+
+namespace
+{
+	PCTSTR Concat(std::wstring& wstrBuffer, PCTSTR pszFirst, PCTSTR pszSecond)
+	{
+		if(pszFirst && pszFirst[ 0 ] != _T('\0'))
+		{
+			wstrBuffer = pszFirst;
+			wstrBuffer += _T(".");
+			wstrBuffer += pszSecond;
+		}
+		else
+			wstrBuffer = pszSecond;
+
+		return wstrBuffer.c_str();
+	}
+}
+
+namespace chcore
+{
+	TSizeFormatter::TSizeFormatter()
+	{
+	}
+
+	TSizeFormatter::TSizeFormatter(const wchar_t* strBytes, const wchar_t* strKBytes, const wchar_t* strMBytes, const wchar_t* strGBytes, const wchar_t* strTBytes) :
+		m_strBytes(strBytes),
+		m_strKBytes(strKBytes),
+		m_strMBytes(strMBytes),
+		m_strGBytes(strGBytes),
+		m_strTBytes(strTBytes)
+	{
+	}
+
+	void TSizeFormatter::SetValues(const wchar_t* strBytes, const wchar_t* strKBytes, const wchar_t* strMBytes, const wchar_t* strGBytes, const wchar_t* strTBytes)
+	{
+		m_strBytes = strBytes;
+		m_strKBytes = strKBytes;
+		m_strMBytes = strMBytes;
+		m_strGBytes = strGBytes;
+		m_strTBytes = strTBytes;
+	}
+
+	std::wstring TSizeFormatter::GetSizeString(unsigned long long ullData, bool bStrict) const
+	{
+		const size_t stMaxSize = 512;
+		wchar_t szData[ stMaxSize ] = { 0 };
+
+		if(ullData >= 1288490188800 && (!bStrict || (ullData % 1099511627776) == 0))
+			_sntprintf_s(szData, stMaxSize, L"%.2f %s", (double)(ullData / 1099511627776.0), m_strTBytes.c_str());
+		else if(ullData >= 1258291200 && (!bStrict || (ullData % 1073741824) == 0))
+			_sntprintf_s(szData, stMaxSize, L"%.2f %s", (double)(ullData / 1073741824.0), m_strGBytes.c_str());
+		else if(ullData >= 1228800 && (!bStrict || (ullData % 1048576) == 0))
+			_sntprintf_s(szData, stMaxSize, _T("%.2f %s"), (double)(ullData / 1048576.0), m_strMBytes.c_str());
+		else if(ullData >= 1200 && (!bStrict || (ullData % 1024) == 0))
+			_sntprintf_s(szData, stMaxSize, _T("%.2f %s"), (double)(ullData / 1024.0), m_strKBytes.c_str());
+		else
+			_sntprintf_s(szData, stMaxSize, _T("%I64u %s"), ullData, m_strBytes.c_str());
+
+		return szData;
+	}
+
+	void TSizeFormatter::StoreInConfig(chcore::TConfig& rConfig, PCTSTR pszNodeName) const
+	{
+		std::wstring wstrBuffer;
+		SetConfigValue(rConfig, Concat(wstrBuffer, pszNodeName, L"Bytes"), m_strBytes.c_str());
+		SetConfigValue(rConfig, Concat(wstrBuffer, pszNodeName, L"KBytes"), m_strKBytes.c_str());
+		SetConfigValue(rConfig, Concat(wstrBuffer, pszNodeName, L"MBytes"), m_strMBytes.c_str());
+		SetConfigValue(rConfig, Concat(wstrBuffer, pszNodeName, L"GBytes"), m_strGBytes.c_str());
+		SetConfigValue(rConfig, Concat(wstrBuffer, pszNodeName, L"TBytes"), m_strTBytes.c_str());
+	}
+
+	bool TSizeFormatter::ReadFromConfig(chcore::TConfig& rConfig, PCTSTR pszNodeName)
+	{
+		std::wstring strBuffer;
+		chcore::TString strValue;
+
+		if(!GetConfigValue(rConfig, Concat(strBuffer, pszNodeName, _T("Bytes")), strValue))
+			return false;
+		m_strBytes = strValue.c_str();
+
+		if(!GetConfigValue(rConfig, Concat(strBuffer, pszNodeName, _T("KBytes")), strValue))
+			return false;
+		m_strKBytes = strValue.c_str();
+
+		if(!GetConfigValue(rConfig, Concat(strBuffer, pszNodeName, _T("MBytes")), strValue))
+			return false;
+		m_strMBytes = strValue.c_str();
+
+		if(!GetConfigValue(rConfig, Concat(strBuffer, pszNodeName, _T("GBytes")), strValue))
+			return false;
+		m_strGBytes = strValue.c_str();
+
+		if(!GetConfigValue(rConfig, Concat(strBuffer, pszNodeName, _T("TBytes")), strValue))
+			return false;
+		m_strTBytes = strValue.c_str();
+
+		return true;
+	}
+}
Index: src/libchcore/TSizeFormatter.h
===================================================================
diff -u
--- src/libchcore/TSizeFormatter.h	(revision 0)
+++ src/libchcore/TSizeFormatter.h	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -0,0 +1,56 @@
+// ============================================================================
+//  Copyright (C) 2001-2016 by Jozef Starosczyk
+//  ixen@copyhandler.com
+//
+//  This program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU Library General Public License
+//  (version 2) as published by the Free Software Foundation;
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU Library General Public
+//  License along with this program; if not, write to the
+//  Free Software Foundation, Inc.,
+//  59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+// ============================================================================
+#ifndef __TSIZEFORMATTER_H__
+#define __TSIZEFORMATTER_H__
+
+#include <memory>
+#include "libchcore.h"
+
+namespace chcore
+{
+	class TConfig;
+
+	class LIBCHCORE_API TSizeFormatter
+	{
+	public:
+		TSizeFormatter();
+		TSizeFormatter(const wchar_t* strBytes, const wchar_t* strKBytes, const wchar_t* strMBytes, const wchar_t* strGBytes, const wchar_t* strTBytes);
+
+		void SetValues(const wchar_t* strBytes, const wchar_t* strKBytes, const wchar_t* strMBytes, const wchar_t* strGBytes, const wchar_t* strTBytes);
+
+		std::wstring GetSizeString(unsigned long long ullData, bool bStrict = false) const;
+
+		void StoreInConfig(chcore::TConfig& rConfig, PCTSTR pszNodeName) const;
+		bool ReadFromConfig(chcore::TConfig& rConfig, PCTSTR pszNodeName);
+
+	private:
+#pragma warning(push)
+#pragma warning(disable: 4251)
+		std::wstring m_strBytes;
+		std::wstring m_strKBytes;
+		std::wstring m_strMBytes;
+		std::wstring m_strGBytes;
+		std::wstring m_strTBytes;
+#pragma warning(pop)
+	};
+
+	using TSizeFormatterPtr = std::shared_ptr<TSizeFormatter>;
+}
+
+#endif
Index: src/libchcore/Tests/TestsTDestinationPathProvider.cpp
===================================================================
diff -u -ref2ea2589f6eeed54f8001fee72936198172ceed -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/libchcore/Tests/TestsTDestinationPathProvider.cpp	(.../TestsTDestinationPathProvider.cpp)	(revision ef2ea2589f6eeed54f8001fee72936198172ceed)
+++ src/libchcore/Tests/TestsTDestinationPathProvider.cpp	(.../TestsTDestinationPathProvider.cpp)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -27,7 +27,7 @@
 
 	MOCK_METHOD2(GetPathsRelation, EPathsRelation(const TSmartPath& pathFirst, const TSmartPath& pathSecond));
 
-	MOCK_METHOD2(GetDynamicFreeSpace, void(const TSmartPath& path, unsigned long long& rullFree));
+	MOCK_METHOD3(GetDynamicFreeSpace, void(const TSmartPath& path, unsigned long long& rullFree, unsigned long long& rullTotal));
 };
 
 using TestTuple = std::tuple<TString, TString, bool, TString, bool, bool, TString>;
Index: src/libchcore/libchcore.vc140.vcxproj
===================================================================
diff -u -rf0b3178897bcff99beb7fde44dfe952ccbf40bec -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/libchcore/libchcore.vc140.vcxproj	(.../libchcore.vc140.vcxproj)	(revision f0b3178897bcff99beb7fde44dfe952ccbf40bec)
+++ src/libchcore/libchcore.vc140.vcxproj	(.../libchcore.vc140.vcxproj)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -533,6 +533,7 @@
     <ClInclude Include="TSharedModificationTracker.h" />
     <ClInclude Include="TSimpleOrderedBufferQueue.h" />
     <ClInclude Include="TSimpleTimer.h" />
+    <ClInclude Include="TSizeFormatter.h" />
     <ClInclude Include="TSparseRangeMap.h" />
     <ClInclude Include="TSpeedTracker.h" />
     <ClInclude Include="TSQLiteColumnDefinition.h" />
@@ -836,6 +837,7 @@
     <ClCompile Include="TSerializerException.cpp" />
     <ClCompile Include="TSerializerVersion.cpp" />
     <ClCompile Include="TSimpleTimer.cpp" />
+    <ClCompile Include="TSizeFormatter.cpp" />
     <ClCompile Include="TSparseRangeMap.cpp" />
     <ClCompile Include="TSpeedTracker.cpp" />
     <ClCompile Include="TSQLiteColumnDefinition.cpp" />
Index: src/libchcore/libchcore.vc140.vcxproj.filters
===================================================================
diff -u -r734408890246965d47e6bbf2c2978371269dd1fd -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4
--- src/libchcore/libchcore.vc140.vcxproj.filters	(.../libchcore.vc140.vcxproj.filters)	(revision 734408890246965d47e6bbf2c2978371269dd1fd)
+++ src/libchcore/libchcore.vc140.vcxproj.filters	(.../libchcore.vc140.vcxproj.filters)	(revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4)
@@ -515,6 +515,9 @@
     <ClInclude Include="TOverlappedReaderWriterFB.h">
       <Filter>Source Files\Tools\Data Buffer\ReaderWriter</Filter>
     </ClInclude>
+    <ClInclude Include="TSizeFormatter.h">
+      <Filter>Source Files\Tools</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="TSubTaskArray.cpp">
@@ -952,5 +955,8 @@
     <ClCompile Include="TOverlappedReaderWriterFB.cpp">
       <Filter>Source Files\Tools\Data Buffer\ReaderWriter</Filter>
     </ClCompile>
+    <ClCompile Include="TSizeFormatter.cpp">
+      <Filter>Source Files\Tools</Filter>
+    </ClCompile>
   </ItemGroup>
 </Project>
\ No newline at end of file