Write file with Loop, two sources - VisualCron - Forum

Community forum

Joey S
2021-06-23T19:05:12Z
I have two text files as sources and I want to write a new file that is four rows long. I need:
- static text in row 1
- static text + data from source file #1 in row 2
- static text in row 3
- Static text + data from source file #2 in row 4

Example
Source File #1:
Bob
Larry
John

Source File #2:
100
345
23

Final Text

This is my Row 1 Text
My neighbor is Bob
00000000000000
He is 100 years old
This is my Row 1 Text
My neighbor is Larry
00000000000000
He is 345 years old
This is my Row 1 Text
My neighbor is John
00000000000000
He is 23 years old


Is this possible with VC using loops

I tried
Read File - Source #1
Read File - Source #2
(LOOP) Write File

But I cannot seem to work it out

Any ideas?
thomas
2021-06-30T09:13:07Z
Did you figure this one out? I think it should be solvable if you are still stuck
Support
2021-07-08T14:29:45Z
Originally Posted by: Joey S 

I have two text files as sources and I want to write a new file that is four rows long. I need:
- static text in row 1
- static text + data from source file #1 in row 2
- static text in row 3
- Static text + data from source file #2 in row 4

Example
Source File #1:
Bob
Larry
John

Source File #2:
100
345
23

Final Text

This is my Row 1 Text
My neighbor is Bob
00000000000000
He is 100 years old
This is my Row 1 Text
My neighbor is Larry
00000000000000
He is 345 years old
This is my Row 1 Text
My neighbor is John
00000000000000
He is 23 years old


Is this possible with VC using loops

I tried
Read File - Source #1
Read File - Source #2
(LOOP) Write File

But I cannot seem to work it out

Any ideas?



Just checking in with the same question as thomas, did you get it working or do you still need help with this?

Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
Joey S
2021-07-12T19:54:49Z
any suggestion would be great. I found another method for that specific case but I would like to have this as an option in the future

thomas
2021-07-14T07:32:15Z
Hard to explain, so I exported an example. I'ts version 9.8.0, so it may not work for you. Replace job variable 'folder'. In the folder you need to add files called file1.txt and file2.txt.

  FileLoop.zip (6kb) downloaded 1 time(s).
Support
2021-08-05T12:43:27Z
Originally Posted by: Joey S 

any suggestion would be great. I found another method for that specific case but I would like to have this as an option in the future



Thanks thomas,

Let us know if thomas solution works for you, otherwise please send us an email to support@visualcron.com and refer to this thread.
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
Scroll to Top