Restore damaged macro file with several macros inside

Restore damaged macro file with several macros inside

1
NewbieNewbie
1

    Jun 25, 2012#1

    Hi everybody.

    I'm a little afraid because when I want to load my macro file (which contains all my macros written months over months for my work), UltraEdit-32 version 9.00a displays a message error which tells me: "Not a valid macro file".
    I've always saved my macros with UltraEdit and I've never had any problem before.
    I've a backup of my macro file, but the backup is a copy of the original macro file which doesn't work too (obviously).
    Has somebody ever had the same problem?
    Is there a tip to "restore" my macro file?

    Thanks a lot for your answers.

    Best regards.

    6,686585
    Grand MasterGrand Master
    6,686585

      Jun 25, 2012#2

      UltraEdit macro files are stored compiled in binary. As it is common for all binary files, a single bit failure within the binary data can make the whole file unreadable. Therefore I recommend to store all macros in a macro file additionally decompiled as plain text file beside the macro file. How this can be done is explained in sticky topic Macro examples and reference for beginners and experts.

      It looks like your macro file is corrupt now and you don't have a working backup. The only hint I have for you in this worst case scenario is to do following:
      • Create a copy of your macro file and an empty directory and open this copy in UltraEdit via File - Open in hex edit mode.
      • Next extract attached split_macro_file.zip and load the macro file SplitMacroFile.mac containing just 1 macro. I hope you can load it. I have created it with UltraEdit v11.20. A text version of this macro is also included.
      • Run the macro Split Macro File once on your opened corrupt macro file. The macro saves now every macro within this macro file into a separate *.mac file into active working directory (directory of last file open) using macro name as file name. I just can hope that none of your macros contain in name a character not allowed in a file name as this results in an error on Save As.
      • Now load one *.mac file after the other. The one you can't load contains the error.
      You have to recreate the corrupt macro completely new. All others can be merged together again using Macro - Load and Append to Existing. Be aware that several macros inside the macro file can be corrupt. So load all *.mac files at least once to find out which are okay and which are corrupt.
      split_macro_file.zip (689 Bytes)   286
      Contains macro to split a macro file containing multiple macros into separate macro files.