Command line batch

Feel free to ask any question here
Post Reply
TDJ
Posts: 5
Joined: Fri Oct 11, 2019 3:27 pm

Command line batch

Post by TDJ »

I have next to no experience with cmd, but have successfully written some .bat files for batch processing files in CloudCompare, with a new line for each file like this:

cd /d C:\Program Files\CloudCompare
CloudCompare -O test\file_1.txt -SS SPATIAL 0.5
CloudCompare -O test\file_2.txt -SS SPATIAL 0.5
CloudCompare -O test\file_3.txt -SS SPATIAL 0.5
...

I would like to process all files in a folder without having to write them all out, so I tried this format with no success, along with variations.

cd /d C:\Program Files\CloudCompare
for file in test\*
do
CloudCompare -O "$file" -SS SPATIAL 0.5
done

Is my script wrong or is this not possible?
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command line batch

Post by daniel »

I think there are other messages on the forum (or maybe on github) with examples of such script. That's definitely possible!

The challenge will be to find them however :)
Daniel, CloudCompare admin
Post Reply