Selecting Multiple File Types With Path Control

My application uses a file path control for the user to specify an output file.  This output file can have two different formats (.csv or .mbf) which is unknown until the user specifies it through the file dialogue.  However, when the user inputs a file name with a .mbf extension (test.mbf, for example), the file path control automatically appends the typed-in name with a .csv extension (test.mbf.csv).  Given that the Pattern field on the control is written like this: *.csv; *.mbf., it seems that the control is simply taking the first file pattern listed and appending it to whatever is typed into the File Name field in the file dialogue box.  Selection Mode is set to "Files" and "New or existing".
Anyone know a way to smarten up the file control to recognize the appropriate file type?
Using LabVIEW 8.6.1.
Thanks!
Andrew
Solved!
Go to Solution.

Instead of using the file path control, try using the Fial Dialog Express VI. This will bring up the same dialog box but will allow you much more flexibility. Replace your file path control with a button ("Specify Path" in my example code):

Similar Messages

  • File Select Popup not restricing multiple file types

    I have a Bitmap picture in which I call GetBitmapFromFile right after this popupfile select.  So I want the user to pick one of the folowing filetypes seen below.
    I have the following call
    FileSelectPopup ("", "*.*", "*.tif;*.pcx;*.bmp;*.dib;*.rle;*.ico;*.jpg;*.png;*.wmf;*.emf", "Select picture file", VAL_LOAD_BUTTON, 0, 0, 1, 0,pic_file_name); //Extension Not Required
    But when this is ran, it prompts the user showing all file types and all file types are allowed.
    Doing the following:
    FileSelectPopup ("", 
    "*.tif;*.pcx;*.bmp;*.dib;*.rle;*.ico;*.jpg;*.png;*.wmf;*.emf",
    "*.tif;*.pcx;*.bmp;*.dib;*.rle;*.ico;*.jpg;*.png;*.wmf;*.emf", "Select
    picture file", VAL_LOAD_BUTTON, 0, 0, 1, 0,pic_file_name); //Extension not required
    The prompt shows only those file-types, but the default stays on .emf and the user must select the correct file-type at the bottom they are trying to select.
    If I do the following (with commas and restrict file-extension):
    FileSelectPopup ("", "*.tif;*.pcx;*.bmp;*.dib;*.rle;*.ico;*.jpg;*.png;*.wmf;*.emf", "*.tif,*.pcx,*.bmp,*.dib,*.rle,*.ico,*.jpg,*.png,*.wmf,*.emf", "Select picture file", VAL_LOAD_BUTTON, 0, 1, 1, 0,pic_file_name); //using commas
    It shows the correct files, but when clicking one, it says the file-type must be .emf
    The only workign way I found was to do the last statement, but not restrict the file-extension.  (This would give the user the option to change the file-type)
    What I want is the file-type allowed list to be one of those file-types, only show files with those extensions and not require/allow the user to select which file-type they will choose.
    Can this not be done?

    I see no way of customizing FileSelectPopup the way you want: either you restrict extensions, and you are limited to "Default file spec" contents (in case you put a filetype list in this field, the last one is used, as you already noted) or you allow to change extensions, but the user must choose which one to use an "*.*" is always present.
    I am afraid you will need to post-process operator's choice and prompt again in case of non-allowed extension.
    As an alternative you can use the toolbox path control, which can be tailored the way you want but it isn't as easy for the operator as FileSelectPopup. It iìultimately is a string control with customized features to offer an alternative in selecting files / paths. You can tailor it by doing so:
        SetCtrlVal (panelHandle, PANEL_STRING, "c:\\myDefaultPath");
        errChk (NewPathCtrl (panelHandle, PANEL_STRING, 15, 1));
        SetPathCtrlAttribute (panelHandle, PANEL_STRING, ATTR_PATH_CTRL_FILE_FILTER, "*.bmp;*.ico");
    This control permits you a limited filetype choice but forces the user to more impactive operability to select the desired file.
    There is a sample project that  uses this control in <sampledir>\userint\custctrl\pathctrl.
    Another alternative is the File Browser toolslib control: a customized tree control which can be restricted to multiple file types; it is relatively slow on large file systems -at least at the first execution.
    The control maintains the native context menu of the original tree control: I suppose this can be tailored as in native control but I haven't tested it: if it's possibleit may help the user in finding the correct file to select.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • BPEL Process with multiple file types using one FTP adapter is not working

    i created a bpel process which will fetch the files from remote location using FTP adapter.
    Now the process works for only one format or file type like *.xls.
    How can i use more than one file format in one FTP adapter.
    OR
    is there any other way to do it.
    file type assignation is 5th step in FTP adapter configuration.
    i have tried *.xls,*.csv and *.xls;*.csv and *.xls:*.csv by seperating with comman, colon, space... still not working.
    i read the documentation *.* will not work.. for one file format it's working fine.
    looking forward for reply as soon as possible.

    Are you positive that it is not working? I'm not sure how you can use one FTP adapter for multiple file types unless the underlying data is exactly the same format or you are processing it as opaque data. Sometimes when a FTP adapter chokes on a file with a bad structure it doesn't create a BPEL instance, it simply moves the bad file to a separate folder.
    So I assume you are using opaque as the data type instead of using an XSD element?
    That said, I don't think you can put two separate file types in the filter. Is it possible for you to do something like: CommonFileName*.* or do you have similar files with other extensions?
    I know the above probably isn't of much help, but I had so many problems with the FTP adapter and its lack of features that I am writing my own. Unfortunately that is a large undertaking and there isn't any good documentation of JCA resource adapter / BPEL PM integration.

  • Selecting multiple files with mouse now wonky

    Using Windows 8.1 on HP machine
    All updates up-to-date
    Hardware: Microsoft Intellimouse Explorer 3.0
    Explorer Folder Option selected: Single-click to open an item (point to select); Underline icon titles only when I point on them
    Display: Detail list (Ctrl + Shift + 6)
    No touch input
    Here's the problem: For as long as I have used windows, I can select multiple files by pressing ctrl-left mouse button. If I want to select multiple consecutive files, I move my cursor down to the last file in the list and press shift-left mouse button.
    If I want to select multiple files that are not listed consecutively, I move my cursor along the list of files and press ctrl-left mouse button to select each individual file.
    This does not work for me any longer and I do not know why.
    Often I will press ctrl-left mouse click and the file will not select. When I move my mouse away from the file I've selected, it will UN-select. If I continue to press the CTRL key while attempting to select another file and float my mouse cursor down the
    list of files to select ONE single file further in the list, ALL the files in between the first file I click and the final file will become selected.
    Moving the mouse cursor carefully and steadily to select individual files yields varied results; sometimes I can select individual files; sometimes, I can click multiple times to select an additional file and the file will not become selected. More often
    than not, I will select several files and earlier files will become unselected.
    Extremely frustrating.
    I have been a Windows user since version 3.1 and this has never happened to me. I have been a Windows 8.1 user for over a year now and this is a new wrinkle. I have done system restore multiple times and it has not solved the problem. I have uninstalled
    Intellipoint/Microsoft Keyboard & Mouse center and reinstalled and the problem has not solved. I have checked every setting for my mouse in the mouse center and cannot see a setting that imposes this feature.
    Changing folder options to Double-click to open an item (single click to select) solves the problem. I am able to navigate and organize my files the way I always have. Only happens when single-click feature is enabled. Please note: I have been using the
    single-click select feature since Windows XP.
    Your guidance and actual solution to this irritant is appreciated.

    Hi,
    During my test, I cannot repro this issue even I configure the same setting with you. Maybe a hardware issue or software issue.
    Does this issue happen to other mouse?
    Can you test in safe mode to check how it works?
    Alex Zhao
    TechNet Community Support

  • Selecting Multiple Files With Shift Key

    Am I right in understanding that the only way to select multiple files with the Shift key in Finder is by using File view? Seems kinda silly.
    Thank you, Scott

    I'm at my Snow Leopard machine right now, and I'm not sure that nothing was changed in Mavericks, but I never noticed that it was.
    I have four view modes: Icon, List, Column and CoverFlow.
    I almost always use Column view, but I am guessing that you are calling Icon view File view. In Icon view, Shift clicking seems to work the way Command clicking does in Column view (and probably the other views as well): it allows you to add randomly selected files to the selection. In Column view, Shift clicking works like it does for most things (like text selection); it selects every thing between the previous click and the Shift click.

  • How to select multiple files with Trackpad

    I am new to Mac and to the Trackpad. I apologize if this has been posted.
    When I work on a Windows PC, if I want to select multiple consecutive files I can click on the first file, press and hold SHIFT and then select the last file and all files in between are selected.
    I tried that using the Trackpad and it doesn't seem to work the same way. Is there another key combination? I can select multiple files by either using SHIFT (on Picasa website for example) and then tap or by holding COMMAND and then tap each individual file. But how do I select multiple files similar to Windows, clicking first file pressing a key and clicking the last file.
    Thanks in advance for any input on this.

    If you choose 'view as list', you can use the shift-key. Select an item, press the shift-key while you press an item below and all the items between are selected.

  • Problems selecting multiple files

    I just replaced my MacBook Pro with a newer version.  I am trying to organize my photos and cannot select multiple files or photos.
    I'm needing to organize in Pictures not iPhoto. 
    I've had Macs for years and never had an issue before.
    Thanks,

    the problem is you are not stoping the writing to file when you hit the end of one file.
    At the server you should count the number of bytes that you write to the disk and should stop when the total count reach the file size.
    Or you have to completly change your protocole to handle entire file as one unit.
    Ex:-
    public class MyFile implements java.io.Serializable{
    String path;
    private void writeObject(ObjectOutputStream oos){
       oos.defaultWriteObject();
       byte b[] = new byte[1024*128];
       int i = 0;
       FileInputStream fis = new FileInputStream(path);
       while ((i = fis.read(b)) >=0){
          oos.writeObject(trim(b,i));
       fis.close();
       oos.writeObject("EOF");
    private byte[] trim(byte b[], int i){
        byte b2[] = new byte;
    System.arraycopy(b,0,b2,0,i);
    return b2;
    // You should be able to write the read object method

  • FM for getting teh file name with path

    Hi guys,
    Is there an fm getting the file name with path given the physical path and file name? Thanks!

    Hi Mark,
    Function Module WS_FILENAME_GET is obsolete, dont use it.
    Use the Method file_open_dialog of  class cl_gui_frontend_services as given below.
    DATA:
        lt_filetable TYPE filetable,
        lf_rc        TYPE i,
        lv_filename(50) TYPE c,
        lv_fileext(3) TYPE c,
        ls_file TYPE file_table,
        lv_file TYPE localfile,
        lv_title TYPE string.
      lv_title = sy-title.
      lv_progname = sy-cprog.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title            = lv_title
          file_filter             = '*.txt'
          multiselection          = abap_false
        CHANGING
          file_table              = lt_filetable
          rc                      = lf_rc
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          not_supported_by_gui    = 4
          OTHERS                  = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                   DISPLAY LIKE 'E'
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ENDIF.
    * Number of selected filed must be equal to one.
      CHECK lf_rc = 1.
    * Access selected file
      READ TABLE lt_filetable INTO ls_file INDEX 1.
      CHECK sy-subrc = 0.
      lv_file = ls_file-filename.
      SPLIT lv_file AT '.' INTO lv_filename lv_fileext.
    Revert back if you need clarifications.
    Regards
    Karthik D

  • Associating file types with an executable

    I would like to be able to associate a file type with my executable,
    and have a specific file load into my executable when that file is
    double clicked (similar to how Excel opens an xls file when that xls
    file is double clicked). Is there any way to do this in labview? The
    file is a TDMS file.
    Thanks,
     Rodrigo

    You should be able to do this with the application->app.arguments property.
    This property gives you the command line arguments (like in c the args[] on the main function).
    This returns a string array, when you use an open with or drag a doc into your build (check the pass command line arguments under the advanced builds options page) this property will return a string array, the second element is the path to the doccument.  In the beginning of your processor/display exe check if this is a valid file and execute the code as desigend.  A state machine architecture is nice fvor this, add a stat called check command line and if this is valid jump into your processing state, otherwise run your program as expected.  You can retrofit any processing application with this approach.  As for locking the associations, you can usually do this by giving your docs a unique extension (dont use an existing extension like .txt, .exe, .vi ...) Click open with, browse for your application, after select always use this application.
    This has worked for me in the past.
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • How do you select multiple files on a macbook pro?

    Can anyone tell me how to select multiple files at one time?  I am so frustrated with the way macbook pro works that I really regret buying it.  I hate that you can't select multiple files, and that my contact stuff keeps changing.  It is certainly not like I was told...that I would never want to use a PC again.  I would not buy another apple computer.  I spent a lot of money to NOT be able to do things that I have always done with ease.  Every time I think I have something figured out, it doesn't work the next time I go to use it in another program.  If anyone has an answer to this, I would sure appreciate it. 
    And all of these so called wonderful updates to the operating system on all mac products have left me frustrated and liking my apple products far less than I did before.  On my iphone I had to make the texts just huge to even be able to see the white writing on a blue background.  Not sure who made these designs, but from my perspective, I can tell you they certainly weren't thinking about being user friendly in any way when they did it.  So disappointed in all of my devices!  I do not enjoy using my computer, ipad, or iphone even close to what I did before.

    This is some information on the Finder.
    http://support.apple.com/kb/ht2470
    To select multiple files you can use the shift key with the mouse if they are in a contiguous list or the CMD key with the mouse if you have breaks in that list. You can also use the mouse to drag over the files you want to select.
    The Macs are easy to use, I have used many versions of Windows, Linux and other operating systems and I find OS X is far the easiest, but that is me.
    There are many instructional videos and texts on Apples web site and if you are near to an Apple store they do classes to help.
    Hope you get used to it.

  • Ipad 4: how do I attach multiple file types to an email?

    Hello,
    I have seen multiple threads on this topic saying you can only do attachments in an email (other than photos or videos) by going to the app that holds the file and emailing it from there (ex: go to adobe reader or ibooks to email a PDF). This work around seemed sufficient for some people but I have need to attach a JPG, PDF and .doc to a single email. How do I do this within the ipad's built in email app? Is this impossible and if so are there other free email apps that someone can reccmmend?
    I find the ability to only email files from within its parent app to be cumbersome and not in keeping with Apple's style of making one's life easier and more efficient. In fact this seems woefully backward and goes back to the early days of computing. I get it that emailing from within a particular app is necessary but so is the ability to attach multiple file types from within the email app. :-(
    So frustrated!!

    The GoodReader App can manage files and create emails consisting of multiple files types.
    See here: https://itunes.apple.com/us/app/goodreader-4/id777310222?mt=8

  • How do I select multiple files under "Get File Info"and lock or unlock all?

    How do I select multiple files under "Get File Info"and lock or unlock them all? It seems to do it automatically when I have 10 or more selected. But how do I lock or unlock 5 or 6 files in one swoop? Thanks

    Select the desired files then press OPTION and select Show Inspector from the Finder's File menu.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • How to prompt user to select multiple files in file dialog using scripts

    Hi, is there a way to allow user to select multiple files inside the file dialog using scripts? So not just something like "*.ai" or "*.eps" but where the user can actually use their shift key to select a batch of files inside the file dialog and then the script would process each one.
    Thanks!

    // Main Code [Execution of script begins here]
    here's what I have so far. it would also be nice to not have illustrator stop at errors.. right now, it skips dialogs but on errors, it still stops.
    // uncomment to suppress Illustrator warning dialogs
    app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
    var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, pdfSaveOpts, folderName;
    var fullPath = "";
    var finalSlash;
    // Select the source folder.
    sourceFolder = Folder.selectDialog( 'Select the folder with Illustrator .ai files you want to convert to PDF');
    f = find_files(sourceFolder);
    function find_files (dir)
        return find_files_sub (dir, []);
    function find_files_sub (dir, array)
        var f = Folder (dir).getFiles ("*.*");
        for (var i = 0; i < f.length; i++)
            if (f[i] instanceof Folder)
                find_files_sub (f[i], array);
            else
                if (f[i].name.slice (-3).toLowerCase() == ".ai"          || f[i].name.slice (-4).toLowerCase() == ".eps")
                        //convert the array-listing to a string so we can manipulate it
                        fullPath = String(f[i]);
                        //find the position of the last / to indicate where the filename starts
                        finalSlash = fullPath.lastIndexOf("/");
                        //get the foldername by "slicing" from start to where finalSlash is located
                        folderName = fullPath.slice(0, finalSlash).toLowerCase();                   
                        sourceDoc = app.open(f[i]); // returns the document object
                        // Call function getNewName to get the name and file to save the pdf          
                                                      targetFile_PNG = getNewName(".png");
                                                      if(targetFile_PNG.exists) {
                                                      } else {
                                                                pngExportOpts = getPNGOptions();
                                                                sourceDoc.exportFile(targetFile_PNG, ExportType.PNG24, pngExportOpts );
                        targetFile_PDF = getNewName(".pdf");
                        pdfSaveOpts = getPDFOptions();
                                                      sourceDoc.saveAs(targetFile_PDF, pdfSaveOpts );
                                                      targetFile_SVG = getNewName(".svg");
                                                      svgSaveOpts = getSVGOptions();
                                                      sourceDoc.exportFile(targetFile_SVG, ExportType.SVG, svgSaveOpts );
                        sourceDoc.close();
                        array.push (f[i]);
    getNewName: Function to get the new file name. The primary
    name is the same as the source file.
    function getNewName(ext)
        var ext, docName, newName, saveInFile, docName, finalDot
        var loop = 0;
        docName = sourceDoc.name;
        ext = ext; // new extension for pdf file
        newName = "";
        finalDot = sourceDoc.name.lastIndexOf(".");
        while(loop < finalDot)
            newName += docName[loop];
            loop = loop + 1;
        newName += ext; // full pdf name of the file
              newName = newName.replace(" [Converted]","");
        // Create a file object to save the pdf
        saveInFile = new File( folderName + '/' + newName );
        return saveInFile;
    getPDFOptions: Function to set the PDF saving options of the
    files using the PDFSaveOptions object.
    function getPDFOptions()
        // Create the PDFSaveOptions object to set the PDF options
        var pdfSaveOpts = new PDFSaveOptions();
        // Setting PDFSaveOptions properties. Please see the JavaScript Reference
        // for a description of these properties.
        // Add more properties here if you like
        pdfSaveOpts.acrobatLayers = false;
        pdfSaveOpts.colorBars = false;
        pdfSaveOpts.colorCompression = CompressionQuality.AUTOMATICJPEGHIGH;
        pdfSaveOpts.compressArt = true; //default
        pdfSaveOpts.embedICCProfile = false;
        pdfSaveOpts.enablePlainText = false;
        pdfSaveOpts.generateThumbnails = false; // default
        pdfSaveOpts.optimization = true;
        pdfSaveOpts.pageInformation = false;
        pdfSaveOpts.preserveEditability = true;
        return pdfSaveOpts;
    function getSVGOptions()
              var svgSaveOpts = new ExportOptionsSVG();
              //just using defaults aside from what's written below
      //see http://cssdk.host.adobe.com/sdk/1.0/docs/WebHelp/references/csawlib/com/adobe/illustrator/ ExportOptionsSVG.html
      svgSaveOpts.embedRasterImages = true;
      svgSaveOpts.sVGTextOnPath = true;
              return svgSaveOpts;
    function getPNGOptions()
              // Create the PDFSaveOptions object to set the PDF options
              var pngExportOpts = new ExportOptionsPNG24();
              // Setting PNGExportOptions properties. Please see the JavaScript Reference
              // for a description of these properties.
              // Add more properties here if you like
              pngExportOpts.antiAliasing = true;
              pngExportOpts.artBoardClipping = false;
              pngExportOpts.horizontalScale = 100; // scaling to 350%
              pngExportOpts.saveAsHTML = false;
              pngExportOpts.transparency = true;
              pngExportOpts.verticalScale = 100; // scaling to 350%
              return pngExportOpts;

  • Multiple File Upload With Metadata Using REST

    hi all
    I want to upload multiple files with metadata to document library using REST API. I am using this msdn article
    http://msdn.microsoft.com/en-us/library/office/dn769086(v=office.15).aspx for uploading file. I am able to upload single file to document library but it is not working for multiple file. when I select multiple file it is uploading last selected file. can
    anyone help with this. I am using office 365 environment.
    Thanks in advance

    Hi,
    According to your post, my understanding is that you wanted to use the REST to upload multiple files.
    Per my knowledge, the REST API is not supported for uploading multiple files via a single call.
    You can write your own loop to upload multiple files via an individual call.
    http://sharepoint.stackexchange.com/questions/108525/multiple-file-upload-with-metadata-using-rest/108532#108532
    More reference:
    http://sharepointfieldnotes.blogspot.com/2014/04/uploading-documents-and-setting.html
    http://www.shillier.com/archive/2013/03/26/uploading-files-in-sharepoint-2013-using-csom-and-rest.aspx
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to add list of multiple file types to file type of file dialog box in LabVIEW

    How to add list of multiple file types to file type of file dialog box in LabVIEW?
    In file dialog box there is option to add only one file type,in the list,not by seperating commas,
    regards,
    Naresh.N

    Write the file types in pattern Input string, separated by a semicolon ;
    For example:  *.vi;*.doc;*.jpeg;*.xls
    This should return the set of files with matching extensions
    Message Edited by devchander on 09-10-2008 08:02 AM
    Message Edited by devchander on 09-10-2008 08:03 AM

Maybe you are looking for

  • Inspire 5200 5.1 sound from both R & L rear speakers coming from left rear speaker only

    I have done a complete sound system check, every thing check out good. From the rear speakers I am only getting sound from left rear. When i do a speaker check, when right rear speaker lites, sound comes from left rear. when left rear speaker lites s

  • Has anyone seen this problem? :(

    Hey Everyone, I picked the new white 30 gb ipod video up yesterday. I opened it set it up and transfered all my vids and music. Now my problem is the clickwheel. It scrolls about 200 (literally songs at a time and is not acurate with the amount of co

  • Does firefox put files into the recycle box?

    I opened up my recycle box this am and found it was full of internet shortcuts. I did not put them there. Is there any way that Firefox did, or did I accidentally do this myself?

  • Firefox toolbar text size & icons too small

    Hello Firefox Help: I have Windows 7 Home Premium with Firefox 3.6.13. The icons and text is far too small in my toolbar. I used the add-on "Theme Font & Size Changer" and it helped with the text. However, all of icons are too small. I recall this be

  • Can't change cookies setting in 5.1

    When I change the cookies setting in Safari prefs, it won't take.  Such as Always to Never block or the other way around.   I have to quit Safari and re-open to make the change take effect.   RR