LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting a option to read from 1 of many .txt files stored in the computer

Hi,

I am doing a code to back up data from 2 or 3 pcs in a NAS, backing up is done by a LABVIEW program written in a different pc. I can access the folders of these pcs via shared folders. Now to connect to the pcs, I store the ip address and other relavant data in a .txt. Right now in my program I have saved for one pc in the .txt file and when I click backup in my program the .txt file will be read and the corresponding ip address and folders will be used for backup. I have used the write to spreadsheet and read from spreadsheet to write into a .txt file and read from a .txt file respectively.  But since I have mutiple pcs there will be multiple .txt files. So I need a condition where there are options like pc1, pc 2 etc, where I click on 1 say for eg pc1 then the appropriate .txt file will be read and will be program for backing up. Also there should be an option to update incase a new pc is added to the network. Thanking You in advance.

0 Kudos
Message 1 of 4
(3,068 Views)

I would use List Folder to get the list of text files and use that to populate the allowed strings of a combo box.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(3,059 Views)

Thank You very much for the reply. Could you tell me what is between the list folder and combo box. Its because vi snippet u gave me is of version 15 whereas mine is labview 2011. So I cant figure it out just from the pic. Thank You. 

 

0 Kudos
Message 3 of 4
(3,040 Views)

@vindsan wrote:

Could you tell me what is between the list folder and combo box.


Index Array.  I used it to set the value to the first available file.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(3,031 Views)