Concat "00"

A forum dedicated to George scripting questions
Post Reply
Kylerk
Posts: 47
Joined: 18 Jun 2011, 13:43

Concat "00"

Post by Kylerk »

Is there a way to concat multiple zeros onto a string. The result I always get is just one 0. I'm trying to pad file names.

thanks

kyler
Kylerk
Posts: 47
Joined: 18 Jun 2011, 13:43

Re: Concat "00"

Post by Kylerk »

I solved the problem by running the concat from the other direction. building the file name from the extension t0wards the path
Svengali
Posts: 1557
Joined: 28 Dec 2006, 10:08

Re: Concat "00"

Post by Svengali »

Hi Kyler,

FWIW, here is how I solved it (been wanting some way to save out an ANIMBRUSH as individual frames, so this helps me too...) 8)

Code: Select all

For Num = 1 to 30
  RootName = "CAT"
  Zeros = "x000000"
  FileName = CONCAT(Zeros, Num)
  FileName = CONCAT(FileName, ".png")
  Length = LEN(FileName)
  Mask = Length - 8
  FileName = CUT(FileName,Mask,Length)
  FileName = CONCAT(RootName, Filename)
  tv_warn "FileName = " FileName
END
Sven
Post Reply