Automate opening Mind Maps and resave with Central Topic Title

  • 1
  • Question
  • Updated 5 years ago
Hi all,

I have 700+ Mind maps that were recovered from a hard disk that failed. Now all Mind Maps are named 'filennnnnn.mmap' Has anyone used the built in WinWrap basic language to automate opening and perform some action on a file. I was thinking I would open each file in the folder and reasave file with name of central topic.

There are some examples in the editor help file, but they're more general to the WinWrap language - than to the specifics of dealing with Mind Maps

Any tips or hints would be appreciated

Sub Main
F$ = Dir$("*.*")
While F$ <> ""
Debug.Print F$
F$ = Dir$()

End Sub
Photo of Eamonn Edwardo

Eamonn Edwardo

  • 11 Posts
  • 2 Reply Likes

Posted 5 years ago

  • 1
Photo of Nick Duffill

Nick Duffill, Champion

  • 608 Posts
  • 253 Reply Likes

This is entirely feasible. If you can work out the non-MindManager WWB code, then the MindManager bits you probably need are (or are similar to)

Dim MyDocument as Document
On Error Resume Next
Set Document = Documents.Open(TheNumericalFilename$)
If Not (MyDocument Is Nothing) Then
End If

where "TheNewFilename" is a function that returns a path & filename derived from the active document, using the value


and appending ".mmap".

This function will need to remove vbcr, vblf, ?, /, \, * and any other illegal characters from the filename before saving to disk.

I strongly recommend working on an entirely separate set of files and ensuring that path calculations are correct before letting it loose on 700 files.
Photo of Eamonn Edwardo

Eamonn Edwardo

  • 11 Posts
  • 2 Reply Likes
Thanks Nick, I got that solved. The issues I encountered were with maps that were 'recovered' but still unusable, the amount of maps that I had created that remained with 'central topic' as their title (and required special handling) - also the recovery picked up the files from 'map parts' that I could discard.

All told, I recovered over 300 maps - so pleased with that. Many thanks
Photo of Nick Duffill

Nick Duffill, Champion

  • 581 Posts
  • 229 Reply Likes
Well done Eamonn. An ugly situation that none of us wants to face.