ConCat using variables generated by Separate

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
vanfanel
Newbie
Posts: 15
Joined: Sat Sep 11, 2004 12:38 pm

ConCat using variables generated by Separate

Post by vanfanel » Sat Sep 11, 2004 1:39 pm

Why doesn't this combination of Separate and ConCat work?
Let>files=a;b;c;d
Separate>files,;,file_names
Let>file_names_count=4

Let>k=0
Repeat>k
Let>k=k+1
ConCat>file_names_%k%,1
Message>file_names_%k%
Wait>1
Until>k,file_names_count

Lumumba

Post by Lumumba » Sat Sep 11, 2004 3:46 pm

ConCat>string1,string2

Concatenates string1 with string2. String1 must be a variable containing a string. String2 can be a literal string or a variable. The result is that string1 has string2 appended to it.

-----

I guess what you expect here won't work, as its a mixed up var/literal
ConCat>file_names_%k%,1

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Sep 11, 2004 5:58 pm

I am also confused by
Let>file_names_count=4
You do not need the Let> line. That is one of the features of using Separate>, you don't need to know how many items are being separated, in fact it tells you.

You appear to be assigning a value here to a variable (file_names_count) that is assigned by the previous Separate command. Is it just coincidence that you used 4?

After running Separate> insert a Message>
Let>files=a;b;c;d
Separate>files,;,file_names
Message>Number of files is %file_names_count%
and you will see that 4 is the value in your sample.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts