Search code examples
iteratorwhile-loopformatlabview

Format an iterator in LabVIEW


I am writing out a series of files in a while loop, they are named

1.dat, 2.dat, 3.dat...

but I need the numbers to be formatted to -

00001.dat, 00002.dat, 00003.dat... 

so that the file order is maintained when reading them back in. Is there a way to change the format of the while loop iterator?


Solution

  • Use the "format into string" node, it allows to pad integer with zeros:

    enter image description here