Page 1 of 1

CMD path+name -> Variable

Posted: Mon Mar 26, 2018 10:24 am
by indesinenter1
Hi,
I am using the command windows (CMD) to work with Cloud Compare. Is there an option (or way) to enter the name or path from a variable? In all the examples, always the path or path + name are "character string" that do not allow the use of "for" or "while" to open a new file in each iteration. Is there any way to break this? I am very interested in programming a "for" that opens many different files in each iteration.

I want to change the command:

Code: Select all

CloudCompare -O myhugecloud_1.bin -SS SPATIAL 0.1
CloudCompare -O myhugecloud_2.bin -SS SPATIAL 0.1
CloudCompare -O myhugecloud_3.bin -SS SPATIAL 0.1
...
to:

Code: Select all

for ...
count = count + 1
FILENAME = "myhugecoud_" + count + ".bin"
CloudCompare -O FILENAME -SS SPATIAL 0.1
...
Thanks,

Xabier

Re: CMD path+name -> Variable

Posted: Mon Mar 26, 2018 5:08 pm
by daniel
Hi,

I know that you can use the standard 'for loop' syntax of the Windows batch (see viewtopic.php?f=9&t=2386 for instance). There are other batch scripts examples on the forum.