Page 1 of 1

Command line batch

Posted: Fri Oct 11, 2019 4:00 pm
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?

Re: Command line batch

Posted: Mon Oct 14, 2019 9:24 pm
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 :)