FTPGetFile with variables

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Liberty
Pro Scripter
Posts: 56
Joined: Wed Jun 06, 2007 11:56 am
Location: Sweden

FTPGetFile with variables

Post by Liberty » Wed Jun 06, 2007 12:07 pm

I have started to use FTPGetFile.
It works fine when I give the complete parameter line.

But when I use a variable for the parameter line it does not work at all.

What shall I do to use variable(s)??

(In my case I want to build the fieldnames in the program, while the filenames vary from time to time)

Thank you

Liberty from Sweden

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Wed Jun 06, 2007 1:07 pm

It does work with variables, can you post your FTPGetFile code (change the user/password) that isn't working?

Liberty
Pro Scripter
Posts: 56
Joined: Wed Jun 06, 2007 11:56 am
Location: Sweden

Post by Liberty » Wed Jun 06, 2007 2:07 pm

Let>ftpdata=ftpsample
FTPGetFile>ftpdata

where ftpsample is a complete parameter line (char), which works in itself.

Thank you.
Last edited by Liberty on Thu Jun 07, 2007 5:49 pm, edited 1 time in total.

Liberty
Pro Scripter
Posts: 56
Joined: Wed Jun 06, 2007 11:56 am
Location: Sweden

Post by Liberty » Thu Jun 07, 2007 5:49 pm

I did not get any answer to my question so I have to reply myself.

As I concluded it is not possible to store the complete parameter line as a variable and then make changes to this variable and use the FTPGetFile command again in a repeat loop.

However I found after trying that it is possible to use variables within a specific parameter in the line. E. g. its is possible in this way to change some part of the filename by using a string variable.

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Thu Jun 07, 2007 7:14 pm

Agreed, it appears that each parameter has to be a separate variable.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts