Read Flat File

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
5 posts Page 1 of 1

alexben14

Posts: 7
Joined: Fri Apr 24, 2015 4:29 pm

Post by alexben14 » Fri Apr 24, 2015 4:33 pm
Hello all,

Can you please help me with a basic task for reading the content of a Flat File into a Variable ?

Thank,

Support_Rick

Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Fri Apr 24, 2015 4:46 pm
Try something like the following:


<setVariable label="SetVar: FileContents" name="FileContents" inputFile="C:\Temp\MyFile.txt" version="2.0" />
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696

alexben14

Posts: 7
Joined: Fri Apr 24, 2015 4:29 pm

Post by alexben14 » Sat Apr 25, 2015 8:13 am
Thanks Rick, that is working.

The thing is that I need to use that content to rename a file, and when doing it, it is adding a "return carriage" into the name. Any other option(s) ?

Support_Rick

Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Mon Apr 27, 2015 8:33 am
It depends on what you're trying to do.

Can you post your Project XML here and give me an example?
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696

alexben14

Posts: 7
Joined: Fri Apr 24, 2015 4:29 pm

Post by alexben14 » Mon Apr 27, 2015 9:10 am
I was able to fix it with a Substring Function. Thanks.
5 posts Page 1 of 1