Page 1 of 1

Read Flat File

Posted: Fri Apr 24, 2015 4:33 pm
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,

Re: Read Flat File

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


<setVariable label="SetVar: FileContents" name="FileContents" inputFile="C:\Temp\MyFile.txt" version="2.0" />

Re: Read Flat File

Posted: Sat Apr 25, 2015 8:13 am
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) ?

Re: Read Flat File

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

Can you post your Project XML here and give me an example?

Re: Read Flat File

Posted: Mon Apr 27, 2015 9:10 am
by alexben14
I was able to fix it with a Substring Function. Thanks.