How do I mass-move reports into one new folder (to clean up)? - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Koen AertsKoen Aerts 

How do I mass-move reports into one new folder (to clean up)?


We are currently cleaning up our report folders. In order to do so we want to move all unused reports into a 'quarantene map' before deleting them. How can we move a large number of reports all at once into one folder?
Matt BrownMatt Brown
You will have to use the Eclipse IDE or another IDE tool connected to Salesforce to acheive this. This post will get you started. http://teachmesalesforce.wordpress.com/2011/05/04/updating-reports-with-eclipse-and-the-force-com-ide/ Even though you are not chaning the status field value I beleive you can still use the instructions to change the report folder.
Aiden MartinAiden Martin

Another alternative would be to edit each report folder on the Report page and move unused reports to the Unfiled Public Reports folder.  You can then move all the reports in your Unfiled Public Reports folder to a new "quarantine" folder.  Yeah I know, still a lot of manual effort.

Matt, I don't know if anything has changed but I tried to use the Eclipse IDE a couple of years ago to move reports to another folder and I received a error message stating that moving reports was not supported.

Aiden

Matt BrownMatt Brown
Yep it seems you can move them. I just tried and it worked splendidly! :)


In the Eclipse IDE

  • Create a new project
  • Include ‘reports’ or more specifically the report folders you are concerned with
  • Let Eclipse refresh the project with the reports metadata
  • In Eclipse, navigate to the reports folder you just download and then select the Report Folder you want the reports you want to move from, right click and select Properties
  • Take Note of the Location. This is the path where the metadata files are located
  • Open a windows explorer window and navigate to that path 
  • Highlight all the Reports you want to move and right click Cut
  • Still in the Window explorer navigate back to the list of report folder and expand the one you want to move the reports to and right click and Paste
  • Now back in the IDE highlight the folder titled Reports and right click and Refresh and then right click again and Force.com>Save to Server
  • BOOM! Now you have moved your reports.
Kris RyanKris Ryan
Is there a way to add a query to the project to select the reports you want to move? Meaning, I run a report in SF once a month to select reports that have a Last Run Date less than 365 days. I was manually moving these reports, one by one, to a folder titled 'Reports Flagged for Delete' (or I was having SF do it for me). Can I incorporate this into Eclipse, some how, and then move them from there?
Sarath PMSarath PM
Do the following steps in the Eclipse IDE.

1. Goto "Add/Remove metadata components from the project"
2. Import the required reports and report folders
3. Navigate to <Project Name>/src/package.xml
4. In package.xml, you will see all the mappings of your reports and report folders. The following image is a screenshot of a sample package.xml file.

User-added image

Here "Recruiting_Reports" is one report folder, which is empty and "damn_another_folder" contains 2 reports - Report_1 and report2. All we have to do is, just edit the mapping and make the two reports come under the "Recruiting_Reports". After that, the mapping, it will look something like this.

User-added image

5. Then goto the file system and locate the path of the reports to be moved. Cut and paste reports as per your requirement. (Refer the post by mattybme1).
6. Refresh your eclipse project. (refresh locally. NOT from the server!)
7. Save to server!
Now, your reports have been moved... Its not very easy method, but when you consider the overhead of literally going to each and every report, to change the folder, this is a piece of cake!

Kris RyanKris Ryan
@Sarath PM... thank you so much for the suggestion!! That will work just fine.
Tanya CashoraliTanya Cashorali
@SarathPM, I've tried this method. Everything works locally but as soon as I try to deploy I keep getting the error:

Save error: DeveloperName: This Report Unique Name already exists or has been previously used.  Please choose a different name.
 
Also tried moving just one report and saving to server. This is the error I receive when trying that:

"Unable to save resource 'All_Leads.report' to server: IllegalArgumentException: Project and/or project package list cannot be null.

Any ideas?
Nazeer Ahamed FazlullahNazeer Ahamed Fazlullah
All - I see this thread updated lastly at Mar2012.

I just wanted to update this as if anyone comes and searches for the same - they would get to see the steps to move very easily.
As of today (Nov/2013) - we can easily move reports by drag and drop. Drag the reports to be moved by clicking in icon just before the report name
gaurav kumargaurav kumar
this is not working i have tried all the step by steb but at the last no error occur. Eclipse is also showing the save to server and after updation the same will come . No change is occuring .

Johan YuJohan Yu
Gaurav, have you save the file?
Try refresh in Salesforce web to check if they have moved.
BWB ITBWB IT
@SarathPM:  can you please explain more "5. Then goto the file system and locate the path of the reports to be moved. Cut and paste reports as per your requirement. (Refer the post by mattybme1)."

I want to see reports by "last run date", but I don't see that date when I look at the local copies of the reports.

My end goal is to mass delete reports where last run date is over 1 year ago....

Thanks to anyone that can help
BWB ITBWB IT
I have  researched a bit more, I am going to try using the notepad++ search feature, that looks like what the instructions are saying...
BWB ITBWB IT
Im still struggling, I cant figure out how to use notepad++ search to give me a list of all reports where lastrundate<2/1/2013...
Brittney TaylorBrittney Taylor
@Kris Ryan @Sarath PM: I have the same exact task that you have, except that I had to run a report to show me reports that are NOT tied to dashboards. Is there a way to choose those specific reports? I'm fairly new to this and am hanging on to your every words haha!
Johan YuJohan Yu
Create a custom report type where report may or may not have in Dashboard Component
Richard RoseRichard Rose

I've done some experimenting with ANT. You can't truly move a folder. You can only:

  • Pull the folder/report structure out to XML
  • Copy the contents to another folder
  • Rename the path of every report in the master package file
  • Rename the API name of every report in the folder to be unique
  • Rename the folder itself with a unique api/developer name, 
  • Redeploy


You will now have duplicate copies of the same reports in two different sub-folders.

You then have to: 

  • duplicate every one of the original reports,
  • clear the recycle bin,
  • delete the original folder,
  • and you are done.
Amazing such a simple thing has to be this difficult. I downloaded the "Folder" table/object to a SQL database using the KingswaySoft connector. There is no "ParentID" field pointing to another folder id. Therein may lie the problem, Houston.
Richard RoseRichard Rose
Btw...I don't recommend the above procedure for the faint of heart. It took nearly an hour to test with a SINGLE report.