Scripting to merge maps from different folders

Digaudma
Digaudma Global Mapper User
edited November 2007 in Technical Support
Hello!

I would need help to write a script doing the following.
I have:
- Folder_name1
+ file_tiff1
+ file_tiff2
+ file_tiff3
...
- Folder_name2
+ file_tiff1
+ file_tiff2
+ file_tiff3
...
etc

I would like to merge all the files inside each folder separately. So, to have:
- Folder_name1.tiff (which is the merge of all tiff in the Folder_name1)
- Folder_name2.tiff (which is the merge of all tiff in the Folder_name2)
- etc

I would like to do this with a script because I have a lot of folders and it would take lot of times manually.
I read the script manual, but it is quite complex to start with and to know if we can loop over folder present in a directory etc

help appreciated :-)
Marc

Comments

  • global_mapper
    global_mapper Administrator
    edited November 2007
    The scripting language does not currently have any kind of looping mechanism. However, you could use the IMPORT_DIR_TREE command to import all of the files in a particular folder, then use the EXPORT_RASTER command to export them to a new file. The import could could look like the following:

    IMPORT_DIR_TREE DIRECTORY="C:\Folder_name1" FILENAME_MASKS="*.TIFF"

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com