concatenating text files

Discuss RoboTask here
Post Reply
legalaction
Posts: 5
Joined: Tue Oct 30, 2007 5:10 pm
Location: Germany

concatenating text files

Post by legalaction »

We just bought RoboTask for automating some tasks in our legal office. Since I'm not really familiar with the application yet, I want to know how to concatenate simple text files (with an optional page break between each file...). Actually this is done by a batch file including a line 'copy *.txt sample.txt' and manually inserting page breaks!The system command 'copy' doesn't work and the copy/move action doesn't offer an ability to copy several files into a single one.I'm sure there is a (simple?) solution, but not really obvious for a RoboTask rookie :-)
legalaction
Posts: 5
Joined: Tue Oct 30, 2007 5:10 pm
Location: Germany

concatenating text files

Post by legalaction »

I recently found the correct syntax for the parameters field and
concatenating works now. Remaining issue is to automatically add page
breaks between the files in the target file. Can this be handled in any
way by RoboTask?
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

concatenating text files

Post by Oleg »

Page break is a character with code 12.

You can use "evaluate" action to calculate the string Chr(12) and store to PageBreak variable (for example)

Next you can add this string to the end of each text file.

Do you want an example?
legalaction
Posts: 5
Joined: Tue Oct 30, 2007 5:10 pm
Location: Germany

concatenating text files

Post by legalaction »

Oleg wrote:Page break is a character with code 12.
Yes, I know. I currently use a task with SR32 (Search&Replace) to search thru the concatenated text (each new document begins with '\blank\:B' or \blank\:R = \0x20\0x3a\0x42 e.g.)The blank is replaced by \0x1c which inserts a blank page at the very beginning as a drawback...but at least it works :-)
You can use "evaluate" action to calculate the string Chr(12) and store to PageBreak variable (for example)

Next you can add this string to the end of each text file.

Do you want an example?
I really would appreciate that - and it will help me getting more familiar with the application. Thank you in advance for your kind helpfulness.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

concatenating text files

Post by Oleg »

See this example. This task makes one text file (c:\dest\all.txt) from all text files in c:\incoming folder.
Each file is separated by NewPage symbol (chr(12)).
legalaction
Posts: 5
Joined: Tue Oct 30, 2007 5:10 pm
Location: Germany

concatenating text files

Post by legalaction »

Oleg wrote:See this example.
Thanks a lot for this example. I'll try it out tomorrow in the office...When imported it shows an (UNKNOWN) Evaluate in the first line, which is  unchecked and not editable. Did I miss s.th.? I'm using the current version 2.6...Thanks for your assistance.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

concatenating text files

Post by Oleg »

Probably you haven't installed Basic plugin. Just download here and install. Everything must be working.
Post Reply