CMD path+name -> Variable

Feel free to ask any question here
Post Reply
indesinenter1
Posts: 2
Joined: Tue Mar 13, 2018 7:05 pm

CMD path+name -> Variable

Post 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
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: CMD path+name -> Variable

Post 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.
Daniel, CloudCompare admin
Post Reply