Create list of files in folder, choose file and show choosen one

Hello,
I have got several txt-files in a folder. I list them with "List Folder".
Now I want to choose one of them and show it in a string indicator.
Unfortunately I dont know how to implement that. Can someone please help me with that ?
Karl-Heinz

Sure for a listbox just use the "item names" property to store and retrieve the filenames which will be a 1-D array and the value of the listbox to index the array then do the rest as you have already done.
For a table you'll need to index the 2-D array.
I've attached an example using the listbox.
Systems Test Engineer
Certified LabVIEW Architect (CLA)
Attachments:
Select_File_Listbox.vi ‏21 KB

Similar Messages

  • Creating list of files from a directory

    Hi,
    poked around on the internet, and wanted to be able to create an ArrayList of all files in a directory. This code compiles, but doesn't work:
    import java.io.*;
    import java.util.*;
    public class TestDir {
         public static void main(String[] args){
         File folder = new File("testdir");
         System.out.println("does the folder exist? " + folder.exists());
         System.out.println("is folder a directory? " + folder.isDirectory());
         System.out.println("path: " + folder.getAbsolutePath());
         // create list of files
         try{
         ArrayList<File> files = TestDir.getFileList(folder);
         Iterator i = files.iterator();
         while (i.hasNext()){
         File temp = (File) i.next();
         System.out.println("file: " + temp.getName());
         } catch (IOException e){
         System.err.println("problem creating file list:");
         e.printStackTrace();
         } // end main
         public static ArrayList<File> getFileList(File dir) throws FileNotFoundException{
         ArrayList<File> result = new ArrayList<File>();
         File[] files = dir.listFiles();
         List<File> tempfiles = Arrays.asList(files);
              for(File file : files){
              result.add(file);
         return result;
    } // end classthis compiles fine, but doesn't give me the list of files.
    Any idea what I'm doing wrong?
    bp

    console output:
    C:\jason\java\domPractice>java TestDir
    does the folder exist? true
    is folder a directory? true
    path: C:\jason\java\domPractice\testdir

  • How to use cfdocument  create a PDF file and save the file in server?

    Hi,
    I want to use cfdocument to create a PDF file and save it in
    the server for other people to download,can you give me a idea how
    to do this.Thanks.
    <cfdocument format = "PDF" pagetype="A4"
    orientation="portrait">
    </cfdocument>
    Mark

    Hi
    <cfdocument filename="" format = "PDF" pagetype="A4"
    orientation="portrait">
    </cfdocument>
    Give the physical path to the filename. You have write
    permission for this folder to create a PDF file.

  • Aperture Creating Large JPG file and placing it with Ref File

    When I imported a group of images Aperture automatically created a JPEG file and placed it in the same folder I imported the Master images. The masters are 15.x meg and the JPEG is 3.x Meg. Any idea why this is happening - it is a new behavior

    This was news to me as well. Here's what Apple has to say about it:
    http://docs.info.apple.com/article.html?artnum=304868
    Kind of a bothersome thing to have to do before importing (their suggestion is to move the jpgs before importing). I'd shoot in RAW only except my wife wants the jpgs on her computer while I want the RAW files on mine.
    Message was edited by: Badunit

  • How can FMS create a text file and write data into it in the Server application folders?

    Recently, I writed a programe about creating a text file and writing data into it in the server application folder. My code is as following:
               var fileObj = new File("/MyApp/test.txt");
               if( fileObj !=  null)
                      if(fileObj.open( "text", "append"))
                            fileObj.write( "                                                      ———— Chat Info Backup ————\r\n" );
                            fileObj.close( );
                            trace("Chat info backup document :" +  fileObj.name + " has been created successfully!");    
    But when I run it, FMS throw the error as following: File operation open failed  ;  TypeError: fileObj has no properties.
    Can you help me ? Thanks in advance.
    Supplement: The text file named test.txt doesn't exist before create the fileObj, an instance of File Class.

    Is MyApp the name of the application directory, or is it a child of the application directory? If myApp is the app name, just use test.txt as the path flag in the file constructor.

  • Creating an XLS file and Zip it

    Hi All,
    we have a requirement where in we have to create an XLS file from internal table. This xls file then has to be zipped and mailed.
    If anyone knows how to create an xls file and zip it in WebDynpro, without using OPEN, CLOSE DATA SET etc, Please let us know. It will be of great help.
    Thanks,
    Anand

    >2) Convert the STRING format to XSTRING format by using the FM SCMS_STRING_TO_XSTRING.
    Actually you should use CL_BCS_CONVERT=>STRING_TO_XSTRING now.
    >3) Use the method COMPRESS_BINARY of class CL_ABAP_GZIP to compress the XSTRING file.
    You probably want to use CL_ABAP_ZIP instead of CL_ABAP_GZIP.  CL_ABAP_GZIP only does compression, which is fine for storing a single packet of data in the database.  However CL_ABAP_ZIP is better suited for mult-part zip (multiple inner files).
    >4) Use the method SEND_WEB_MAIL of class CL_HRRCF_SERVICES_MAIL to mail across the zipped contents.
    This seems to be an HR specific class. Better to use the cross application, NetWeaver provided functionality for sending mail - CL_BCS.

  • Create a csv file and send it in an email

    In coldfusion, is it possible to  create a csv file and send it in an email, without ever saving that file on the hard drive?

    Yes, you can create an email attachment without writing a file to disk.  This feature was introduced in CF 8.0.1.
    I've posted a sample to a previous thread on the forums.
    http://forums.adobe.com/message/2123297
    See the CFMAILPARAM section of CF 8.0.1 release notes for attachments without a file on disk.
    http://www.adobe.com/support/documentation/en/coldfusion/801/cf801releasenotes.pdf

  • Create a css file and use it

    Hi
    i use jdev 11.1.1.7
    I have several items on the page . for example panelFormLayout .
    i want declare several property (background-color ,...) and assing it to all of panelFormLayout .
    so whenever i change color of background ,  background color of ALL panelFormLayout change easily .
    (I created a css file and declared my property in it but i cant use it !!! )
    NOW i hope to create a CSS file or(any thing you suggest) for this reason and use it .
    How can i do this ?
    Thanks alot

    You can also download the stand-alone Skin Editor to help you create the skins and style you want.
    A bit more on the topic here:
    https://blogs.oracle.com/shay/entry/styling_specific_adf_components_with

  • 8dot3 filenames not created for Program Files and Program Files (x86)

    Interesting issue we are realizing on Servers deployed from SCCM 2012. 8dot3names are not created for Program Files and Program Files (x86). they are created for other files/folders at the root of C and below Program Files and Program Files (x86). This is
    causing issues when programs are installed and the path is then created with 8dot3 filenames for program files and program files (x86)

    Arg. we just got bitten by this "feature", and it's affecting our security software stack (name starts with M and ends with ee), and some ancient crud too.
    And found this, which suggests a logical reason for 8dot3name to not be present on servers, but, on clients, I think it's a rather gross assumption...
    http://blogs.technet.com/b/josebda/archive/2012/11/13/windows-server-2012-file-server-tip-disable-8-3-naming-and-strip-those-short-names-too.aspx
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • What programme creates a .ggi file and why would it be used?

    Have been asked to create a .ggi file and I have never come across this file extension before.
    I have googles it and got as much information as possible but can't seem to find the answer - why would it be used, what is it used for and what software creates it.
    Also, not sure where to ask this question so apologies if this is in the wrong forum!
    Any help greatly appreciated!!!!

    We can't know. File extensions are completely arbitrary and if whoever requested the format can't tell you what he/ she needs, then we can't either. If it were a commonly used file format we would probably not, but since we don't, it is probably a proprietary format associated with some lesser known or even exotic software. That being so, the request to provide such a file is actually even pretty stupid, since the only way to create it would be to have access to that program. Causal loop.
    Mylenium

  • I have created an iMovie file and have created an iDVD menu file. I am now ready to burn a DVD. But my superdirve is broken. If I put my files on a mac without iMovie or iDVD, can I burn my DVD with Toast 11?

    I have created an iMovie file and have created an iDVD menu file. I am now ready to burn a DVD. But my superdirve is broken. If I put my files on a mac without iMovie or iDVD, can I still burn my DVD with Toast 11?

    no need for Toast ..
    tell iDVD to create a disk-image
    transfer dmg to othe Mac
    launch the Disk Utility, burn that dmg .......

  • I've created a prproj file and want to create a master DVD.  Is there a simple way to do this?

    I've created a prproj file and want to create a master DVD. Is there a simple way to do this?

    I'm not sure I would call disk authoring a 'simple' process.  Unless it's a very basic disk, or course, with but a single timeline and no menus.  But the kind of disk we're using to seeing from Hollywood is anything but simple to create, and so not so simple to explain.
    Might be time for some research.

  • In Quicktime Pro I try to create a mov file and I get an error "-43 a file could not be found".  Any ideas?

    In Quicktime Pro I try to create a mov file and I get an error "-43 a file could not be found".  Any ideas?

    I have a similar problem which i did not have before...and it exists only in some powerpoint files which i want to print as a pdf file...and i get the same message as above.
    the log says the bellow details...what's the problem and how can i resolve it? thanks.
    %%[ ProductName: Distiller ]%%
    %%[Page: 1]%%
    %%[Page: 2]%%
    Cambria not found, using Courier.
    %%[ Error: invalidfont; OffendingCommand: show ]%%
    Stack:
      %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%

  • How to create list of a View's column names and source

    Using SQL 2005, 2008, and 2012
    How to create list of a View's column names and source. For the following example would like to @Print something like the following.  Does anyone already have some code to do this? I realize there are probably some gotchas, but the views that I am looking
    at to use this follows the code snippet pattern below.
    DBACCT.[Account Number]
    dbo.ConvertDate(DBACDT). [Boarding Date]
    DBXES.DBXES
    CREATE VIEW [dbo].[v_ods_DBAL]
    AS
    SELECT DBACCT AS [Account Number], dbo.ConvertDate(DBACDT) AS [Boarding Date], DBXES
    FROM dbo.ods_DBAL

    The column information can be obtained from INFORMATION_SCHEMA.COLUMNS view using logic like below
    SELECT c.COLUMN_NAME,c.DATA_TYPE
    FROM INFORMATION_SCHEMA.COLUMNS c
    WHERE EXISTS (SELECT 1
    FROM INFORMATION_SCHEMA.TABLES
    WHERE TABLE_NAME = c.TABLE_NAME
    AND TABLE_TYPE='VIEW')
    http://technet.microsoft.com/en-us/library/ms188348.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to upload file and show it's progress

    hi
    i want to upload files and show the progress of the upload
    process how?
    thanks in advance.

    Hey,
    I attached a sample I did in Flash 8 using PHP. Hope it
    helps.
    http://www.cybercussion.com/vault/fileuploading.zip

Maybe you are looking for