Click here to Skip to main content
15,897,360 members
Articles / Programming Languages / C++

Clean Visual Studio Workspaces

Rate me:
Please Sign up or sign in to vote.
4.23/5 (16 votes)
6 Jul 20058 min read 150.7K   2K   65  
Clean Viusal Studio workspaces by deleting folders such as Release, Debug etc. and intermediate files.
// Clean WorkspaceDlg.h : header file
//

#if !defined(AFX_CLEANWORKSPACEDLG_H__991B8E7F_2A6E_4339_9667_1C8C3F591285__INCLUDED_)
#define AFX_CLEANWORKSPACEDLG_H__991B8E7F_2A6E_4339_9667_1C8C3F591285__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CCleanWorkspaceDlg dialog

class CCleanWorkspaceDlg : public CDialog
{
// Construction
public:
	CCleanWorkspaceDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CCleanWorkspaceDlg)
	enum { IDD = IDD_CLEANWORKSPACE_DIALOG };
	CListBox	m_ctlList;
	CButton	m_btnDir;
	BOOL	m_bDebug;
	BOOL	m_bKeep;
	BOOL	m_bRelease;
	CString	m_sDir;
	BOOL	m_bIntermediate;
	BOOL	m_bDebugging;
	BOOL	m_bCompiling;
	BOOL	m_bLinking;
	BOOL	m_bOutput;
	BOOL	m_bOthers;
	BOOL	m_bLog;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCleanWorkspaceDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CCleanWorkspaceDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBclean();
	afx_msg void OnBdir();
	afx_msg void OnCheckLog();
	afx_msg void OnChangeEdir();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	void DelShow(CString strFileName);
	void DelFiles(CString strFileName);
	void CleanDir(CString strPath);
	void RecursiveDelete(CString szPath);
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CLEANWORKSPACEDLG_H__991B8E7F_2A6E_4339_9667_1C8C3F591285__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions