Skip to content

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.
  • alexben14 Offline
  • Posts: 7
  • Joined: Fri Apr 24, 2015 4:29 pm

Read Flat File

Post by alexben14 »

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 Offline
  • Support Specialist
  • Posts: 590
  • Joined: Tue Jul 17, 2012 2:12 pm
  • Location: Phoenix, AZ
  • Contact:

Re: Read Flat File

Post by Support_Rick »

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 Offline
  • Posts: 7
  • Joined: Fri Apr 24, 2015 4:29 pm

Re: Read Flat File

Post by alexben14 »

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 Offline
  • Support Specialist
  • Posts: 590
  • Joined: Tue Jul 17, 2012 2:12 pm
  • Location: Phoenix, AZ
  • Contact:

Re: Read Flat File

Post by Support_Rick »

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 Offline
  • Posts: 7
  • Joined: Fri Apr 24, 2015 4:29 pm

Re: Read Flat File

Post by alexben14 »

I was able to fix it with a Substring Function. Thanks.
Post Reply