diff --git a/plugins/genericprojectmanager/genericmanager.cpp b/plugins/genericprojectmanager/genericmanager.cpp
index 0b94d40..a4602c8 100644
--- a/plugins/genericprojectmanager/genericmanager.cpp
+++ b/plugins/genericprojectmanager/genericmanager.cpp
@@ -435,30 +435,34 @@ bool GenericProjectManager::rename(KDevelop::ProjectBaseItem* item, const KUrl&
     return false;
 }
 
-bool GenericProjectManager::removeFolder( KDevelop::ProjectFolderItem * folder )
+template<class T> bool GenericProjectManager::removeFilesOrFolders(QList< T* > items)
 {
-    kDebug() << "removing folder" << folder->url();
-    KDevelop::ProjectFolderItem* parent = getParentFolder(folder);
-    stopWatcher(parent);
-    const bool success = KDevelop::removeUrl(parent->project(), folder->url(), true);
-    if ( success ) {
-        folder->parent()->removeRow( folder->row() );
+    bool success = true;
+    foreach(KDevelop::ProjectBaseItem* item, items)
+    {
+        kDebug() << "removing item" << item->url();
+        KDevelop::ProjectFolderItem* parent = getParentFolder(item);
+        stopWatcher(parent);
+
+        success &= KDevelop::removeUrl(parent->project(), item->url(), true);
+        if ( success )
+            item->parent()->removeRow( item->row() );
+
+        continueWatcher(parent);
+        if ( !success )
+            break;
     }
-    continueWatcher(parent);
     return success;
 }
 
-bool GenericProjectManager::removeFile( KDevelop::ProjectFileItem * file )
+bool GenericProjectManager::removeFolders(QList< KDevelop::ProjectFolderItem* > folders)
 {
-    kDebug() << "removing file" << file->url();
-    KDevelop::ProjectFolderItem* parent = getParentFolder(file);
-    stopWatcher(parent);
-    const bool success = KDevelop::removeUrl(file->project(), file->url(), false);
-    if ( success ) {
-        file->parent()->removeRow( file->row() );
-    }
-    continueWatcher(parent);
-    return success;
+    return removeFilesOrFolders(folders);
+}
+
+bool GenericProjectManager::removeFiles( QList<KDevelop::ProjectFileItem*> files )
+{
+    return removeFilesOrFolders(files);
 }
 
 void GenericProjectManager::stopWatcher(KDevelop::ProjectFolderItem* folder)
diff --git a/plugins/genericprojectmanager/genericmanager.h b/plugins/genericprojectmanager/genericmanager.h
index 5014a9a..be35e39 100644
--- a/plugins/genericprojectmanager/genericmanager.h
+++ b/plugins/genericprojectmanager/genericmanager.h
@@ -68,8 +68,8 @@ public:
 
     virtual KDevelop::ProjectFolderItem* addFolder( const KUrl& folder, KDevelop::ProjectFolderItem *parent );
     virtual KDevelop::ProjectFileItem* addFile( const KUrl& file, KDevelop::ProjectFolderItem *parent );
-    virtual bool removeFolder( KDevelop::ProjectFolderItem *folder );
-    virtual bool removeFile( KDevelop::ProjectFileItem *file );
+    virtual bool removeFolders( QList<KDevelop::ProjectFolderItem*> folders );
+    virtual bool removeFiles( QList<KDevelop::ProjectFileItem*> files );
     virtual bool renameFolder( KDevelop::ProjectFolderItem *folder, const KUrl& url );
     virtual bool renameFile( KDevelop::ProjectFileItem *file, const KUrl& url );
 
@@ -102,6 +102,8 @@ private:
     void continueWatcher(KDevelop::ProjectFolderItem* folder);
     /// Common renaming function.
     bool rename( KDevelop::ProjectBaseItem* item, const KUrl& source, const KUrl& destination);
+    /// Common removal function.
+    template<class T> bool removeFilesOrFolders(QList< T* > items);
 
 private:
     bool isValid( const KUrl& url, const bool isFolder, KDevelop::IProject* project,
diff --git a/plugins/genericprojectmanager/test/reloadtest.cpp b/plugins/genericprojectmanager/test/reloadtest.cpp
index 094db44..4d99036 100644
--- a/plugins/genericprojectmanager/test/reloadtest.cpp
+++ b/plugins/genericprojectmanager/test/reloadtest.cpp
@@ -112,7 +112,7 @@ void ProjectLoadTest::addRemoveFiles()
 
     QCOMPARE(project->filesForUrl(path+"/blub"+QString::number(50)).count(), 1);
     KDevelop::ProjectFileItem* file = project->filesForUrl(path+"/blub"+QString::number(50)).first();
-    project->projectFileManager()->removeFile(file); //message box has to be accepted manually :(
+    project->projectFileManager()->removeFiles( QList<KDevelop::ProjectFileItem*>() << file ); //message box has to be accepted manually :(
     for (int i=51; i<100; ++i) {
         QFile f2(path+"/blub"+QString::number(i));
         f2.remove();
diff --git a/plugins/projectmanagerview/projectmanagerviewplugin.cpp b/plugins/projectmanagerview/projectmanagerviewplugin.cpp
index 00f068b..7df5b4d 100644
--- a/plugins/projectmanagerview/projectmanagerviewplugin.cpp
+++ b/plugins/projectmanagerview/projectmanagerviewplugin.cpp
@@ -461,22 +461,38 @@ void ProjectManagerViewPlugin::createFolderFromContextMenu( )
 
 void ProjectManagerViewPlugin::removeFromContextMenu()
 {
+    QMap< IProjectFileManager*, QList<KDevelop::ProjectFileItem*> > fileItems;
+    QMap< IProjectFileManager*, QList<KDevelop::ProjectFolderItem*> > folderItems;
+    QString itemNames;
     foreach( KDevelop::ProjectBaseItem* item, d->ctxProjectItemList )
     {
-        if ( item->folder() || item->file() ) {
+        if (item->file() || item->folder())
+        {
+            if (item->file())
+                fileItems[item->project()->projectFileManager()] << item->file();
+            if (item->folder())
+                folderItems[item->project()->projectFileManager()] << item->folder();
 
-            QWidget* window(QApplication::activeWindow());
-            int q=KMessageBox::questionYesNo(window,
-                item->folder() ? i18n("Do you really want to remove the directory <i>%1</i>?", item->folder()->url().pathOrUrl())
-                        : i18n("Do you really to remove the file <i>%1</i>?", item->file()->url().pathOrUrl()));
-            if(q==KMessageBox::Yes)
-            {
-                if ( item->folder() ) {
-                    item->project()->projectFileManager()->removeFolder(item->folder());
-                } else {
-                    item->project()->projectFileManager()->removeFile(item->file());
-                }
-            }
+            itemNames += '\n' + item->url().pathOrUrl();
+        }
+    }
+
+    //FIXME: I know kde has a widget for this...
+    QWidget* window(QApplication::activeWindow());
+    int q=KMessageBox::questionYesNo(window, i18n("The following items will be removed, continue?%1", itemNames));
+
+    if(q == KMessageBox::Yes)
+    {
+        //Go though projectmanagers, have them remove the files/folders that they own
+        QMap< IProjectFileManager*, QList<KDevelop::ProjectFileItem*> >::iterator fileIt;
+        for (fileIt = fileItems.begin(); fileIt != fileItems.end(); ++fileIt)
+        {
+            fileIt.key()->removeFiles(fileIt.value());
+        }
+        QMap< IProjectFileManager*, QList<KDevelop::ProjectFolderItem*> >::iterator folderIt;
+        for (folderIt = folderItems.begin(); folderIt != folderItems.end(); ++folderIt)
+        {
+            folderIt.key()->removeFolders(folderIt.value());
         }
     }
 }
diff --git a/project/interfaces/ibuildsystemmanager.h b/project/interfaces/ibuildsystemmanager.h
index 0a84b92..29f77fd 100644
--- a/project/interfaces/ibuildsystemmanager.h
+++ b/project/interfaces/ibuildsystemmanager.h
@@ -29,8 +29,9 @@ namespace KDevelop
 {
 
 class IProjectBuilder;
-typedef QList<ProjectFileItem*> FileItemList;
 class ProjectTargetItem;
+typedef QList<ProjectFileItem*> FileItemList;
+typedef QPair<ProjectTargetItem*, ProjectFileItem*> TargetFilePair;
 /**
  * Manage the file and build system of the project.
  * @author Matt Rogers <mattr@kde.org>, Hamish Rodda <rodda@kde.org>
@@ -101,13 +102,12 @@ public:
     virtual bool addFileToTarget(ProjectFileItem *file, ProjectTargetItem *parent) = 0;
 
     /**
-     * Remove a file from a target
+     * Remove files from targets
      *
-     * Removes the file specified by @p file from the folder @p parent and
-     * modifies the underlying build system if needed. The file is not removed
-     * from the folder it is in
+     * Removes the files from the targets they are paired with (@p targetFiles)
+     * Files are not removed from the folders or the filesystem.
      */
-    virtual bool removeFileFromTarget(ProjectFileItem *file, ProjectTargetItem *parent) = 0;
+    virtual bool removeFilesFromTargets(QList<TargetFilePair> targetFiles) = 0;
 
     /**
      * Get the toplevel build directory for the project
diff --git a/project/interfaces/iprojectfilemanager.h b/project/interfaces/iprojectfilemanager.h
index e9419e1..0a8f4c4 100644
--- a/project/interfaces/iprojectfilemanager.h
+++ b/project/interfaces/iprojectfilemanager.h
@@ -113,21 +113,21 @@ public:
     virtual ProjectFileItem* addFile(const KUrl& folder, ProjectFolderItem *parent) = 0;
 
     /**
-     * Remove a folder from the project and remove it from disk.
+     * Remove folders from the project and delete them from disk.
      *
-     * Removes the folder specified by @p folder from folder @p parent and
+     * Removes the folders specified by @p folders and
      * modifies the underlying build system if needed.
      */
-    virtual bool removeFolder(ProjectFolderItem *folder) = 0;
+    virtual bool removeFolders(QList<ProjectFolderItem*> folders) = 0;
 
     /**
-     * Remove a file from the project and remove it from disk.
+     * Remove files from the project and delete them from disk.
      *
-     * Removes the file specified by @p file and
-     * modifies the underlying build system if needed. If the file being
+     * Removes the files specified by @p files and
+     * modifies the underlying build system if needed. If a file being
      * removed is also part of a target, it should be removed from the target as well
      */
-    virtual bool removeFile(ProjectFileItem *file) = 0;
+    virtual bool removeFiles(QList<ProjectFileItem*> files) = 0;
 
     /**
      * Rename a file in the project
diff --git a/shell/kross/xmltokross/dummybsm.h b/shell/kross/xmltokross/dummybsm.h
index cbf427c..28b1cce 100644
--- a/shell/kross/xmltokross/dummybsm.h
+++ b/shell/kross/xmltokross/dummybsm.h
@@ -48,10 +48,10 @@ class DummyBSM : public KDevelop::IPlugin, public KDevelop::IBuildSystemManager
         KDevelop::ProjectFileItem* addFile( const KUrl&, KDevelop::ProjectFolderItem* ) { return 0; }
 
         bool addFileToTarget( KDevelop::ProjectFileItem*, KDevelop::ProjectTargetItem* ) { return false; }
-        bool removeFolder( KDevelop::ProjectFolderItem* ) { return false; }
+        bool removeFolders( QList<KDevelop::ProjectFolderItem*> ) { return false; }
         bool removeTarget( KDevelop::ProjectTargetItem* ) { return false; }
-        bool removeFile( KDevelop::ProjectFileItem* ) { return false; }
-        bool removeFileFromTarget( KDevelop::ProjectFileItem*, KDevelop::ProjectTargetItem* ) { return false; }
+        bool removeFiles( QList<KDevelop::ProjectFileItem*> ) { return false; }
+        bool removeFilesFromTargets( QList<KDevelop::TargetFilePair> ) { return false; }
         bool renameFile(KDevelop::ProjectFileItem*, const KUrl&) { return false; }
         bool renameFolder(KDevelop::ProjectFolderItem*, const KUrl&) { return false; }
         QHash<QString,QString> environment(KDevelop::ProjectBaseItem *) const { return QHash<QString, QString>(); }
