How to run automatically projects one after the other using a batch script

Warning:This article refers to the command line interface (CLI) and not to the newest version of Pix4Dengine SDK.
We highly recommend migrating to the Pix4Dengine SDK. To get access to the latest documentation please visit Pix4Dengine Server SDK.
 
Note: Command line has to be used with a Pix4Dmapper Enterprise Server License in a Linux and Windows environment.

In order to process automatically projects one after the other, it is needed to create a batch script:

  • The script uses by default the processing options stored in each project and generates the default files and formats of the software.
  • The user interface is not shown during processing. 

In order to create and run projects one after the other by using a batch script:

1. Open Notepad++ and create a new file.
2. On the Save As dialog select the folder where to store the script.
3. On File name enter runProjects.bat and on Save as type select Batch file (*.bat, *.cmd, *.nt).
4. Click Save.
5. Edit the file by adding the projects to be processed. Each project to be processed is defined by the following 3 lines:

echo RUNNING PROJECT <project_name>
"<pix4dmapper_path/pix4dmapper.bat>" -c -r "<project_file_path>"
echo PROCESSING FINISHED

Where:
<project_name> is the name of the project.
<pix4dmapper_path> is the full path where pix4dmapper.exe is installed (by default it is C:\Program Files\Pix4Dmapper). 
<project_file_path> is the path to the .p4d project file to process.

6. End the file with the following line:

pause


7. Save the file and close it.
8. Double click on runProjects.bat to start the processing.

 
Note: For advanced users: More options can be used for processing. For more information: How to use the command line.
 
Example: Script to run two projects, project1 and project2:

echo RUNNING PROJECT project1
"C:\Program Files\Pix4Dmapper\pix4dmapper" -c -r "D:\Project1\project1.p4d"
echo PROCESSING FINISHED
echo RUNNING PROJECT project2
"C:\Program Files\Pix4Dmapper\pix4dmapper" -c -r "D:\Project2\project2.p4d"
echo PROCESSING FINISHED

An example file can be downloaded here.

Was this article helpful?
5 out of 9 found this helpful

Article feedback (for troubleshooting, post here)

0 comments

Please sign in to leave a comment.