Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Adding blank lines to text file.
Topic Summary:
Created On: 02/10/2012 02:03 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 02/10/2012 02:03 PM
User is offline View Users Profile Print this message

Author Icon
RobertGreenwood
Expert (100-199)

Posts: 119
Joined: 09/07/2005

I have a text billing file that I am using the loop through the contents of a file and write to file actions to eliminate certain lines in the output file. The issue is the input file contains blank lines that need to remain in the output file.

The loop file action using new line as the delimiter reads every line (inculding the blank lines) into a varable but the write to file action will not write the blank lines to the outfile. There is a CRLF at the end of all lines but I can't figure out how to carry the blank lines over to the output file. This is needed to keep the document format the same.

Any thoughts?

 Category Survey


-------------------------
Bob Greenwood
BPA8, W2K3 Server,
VMWare, XP Clients
 02/10/2012 09:39 PM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Bob,
if "write to file" does not handle correctly the blank lines, what about replacing the empty line by a single space line ?
Would the document format be kept with that trick ?
I mean writing to the output file the following expression
%iif(theLine=""," ",theLine)%
instead of just writing %theLine%

That's just a workaround, but worth trying.

 Category Survey
AutoMate BPA Server 8 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 02/17/2012 12:56 PM
User is offline View Users Profile Print this message

Author Icon
RobertGreenwood
Expert (100-199)

Posts: 119
Joined: 09/07/2005

Thanks Jean I appreciate your help. I did get this to work based on your suggestion.

 Category Survey


-------------------------
Bob Greenwood
BPA8, W2K3 Server,
VMWare, XP Clients
 02/17/2012 08:57 PM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

You're welcome, Robert.

 Category Survey
AutoMate BPA Server 8 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 2039 guests browsing this forum, which makes a total of 2039 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog