NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

NI_FTPFiles Operation: How to set FilesToFTP--->LocalPath in Pre-Expression?

Hi Guys,

I need to change LocalPath parameter in NI_FTPFiles, but I don't know how to write the correct expression.

I can set it like:

RunState.Sequence.Main["FTP Files"].FilesToFTP.ArrayElementPrototype.LocalPath = "c:\\myfolder\\newfile.txt"

But it is wrong.

 

Any one can help me? Thanks very much!

 

NI_FTPFiles.jpgPre-Expression.jpg

0 Kudos
Message 1 of 3
(2,674 Views)

Try using Step.FilesToFTP[0].LocalPath = "c:\\myfolder\\newfile.txt".  Instead of 0 you could use a numeric variable.

 

It's the proper way to use it in that step anyway.

 

BTW- The reason yours won't work is because FilesToFTP is an array and has to be indexed.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 3
(2,657 Views)

Hi ~jiggawax~,

You are absolutely correct!

I take the index into parameters and works fine now.

Thanks very much for you help!

0 Kudos
Message 3 of 3
(2,636 Views)