How to open a text-file with notepad from labview-vi?

Hello,
how can i execute a program from a vi?
I want to open a textfile with Windows7-Notepad after selelecting it from a file-path-control and pressing an open-button.
Thx for help
Solved!
Go to Solution.

Use the command line.  Something like cmd /c notepad c:\temp\blah.txt should work.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • How to generate a text file with values from internal table

    hi,
    can anybody help me out to get the values from different internal table written into a text file.
    regs,
    raja

    used gui_download,ws_download,cl_gui_file_save.
    data: ld_filename type string ;
    ld_filename = 'c:\demo.txt'.
    DATA: begin of it_datatab occurs 0,
    row(500) type c,
    end of it_datatab.
    HII
    call function 'GUI_DOWNLOAD'
    exporting
    filename = ld_filename
    filetype = 'ASC'
    tables
    data_tab = it_datatab[]
    exceptions
    file_open_error = 1
    file_write_error = 2
    others = 3.
    gui_download

  • How to open a text file

    hello
    if so have an idea on how to open a text file
    thanks

    File file=new File("[path to the text file]");
    String encoding="[encoding of the file]";
    BufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(file), encoding));
    // Do whatever you like with the reader
    // For example write the text file to the output
    String line;
    while ((line=reader.readLine())!=null)
    System.out.println(line);
    reader.close();Hope it helps,
    Marcin
    PS. This is not the write forum category to post this question.

  • Problem with opening various text files in notepad through java

    Hi friends,
    I need to open any .txt file in notepad by running the code in Java.I could open the notepad through java but not a perticular file.I dont even want to hard code my program that only one perticular file will open through it.I want it generalised...if anyone could help me,it would be really nice...
    thanks
    Vishal.

    If your program opens notepad I'll delete it because I set UltraEdit as my default editor. So if you already must use system-specific code, how about grabbing a Windows manual to find out how to use the editor registered for these files? (Hint "start").

  • How to open a text file using button click event

    hi, How can i open a text file in a textpad or notepad on the click event of a button.?
    Thanks
    Jay

    Pnt,
    this will not work LV 8.0.1 and LV 8.6 will give back error 193.
    Attached is a VI to use the ShellExecute WinAPI. The VI is LV 7.1.1.
    Message Edited by waldemar.hersacher on 10-09-2008 10:48 PM
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions
    Attachments:
    ShellExecute.zip ‏27 KB

  • How to open a DWG file with AutoCAD options (AppleScript)?

    Hi,
    I'm looking for help specifying the AutoCAD options when opening DWG files.  I have DWG files of floor plans that I always want to open at the same scale. 
    I can successfully open a DWG file with the default options using:
    open POSIX file "/Users/crmckinnon/Desktop/cabin_floor_plan.dwg" as alias without dialogs
    But I don't want the default options, so if I try to specify them:
    open POSIX file "/Users/crmckinnon/Desktop/cabin_floor_plan.dwg" as alias with options {class:AutoCAD options, scale unit:"autocad inches"} without dialogs
    I get a "Can't find alias" error.  How do I specify the AutoCAD options?  I'm sure this is due to my lack of understanding of AppleScript.  Any help would be appreciated!
    Thanks,
    Chris

    I'll answer my own question.  Here's how I specified the options:
    open POSIX file filePath as alias with options {pGSO:original size, pASU:inches, pASR:12.0 / 0.1875} without dialogs
    I had to look in the Apple Script dictionary to get the "codes" to use.  The variable names didn't work.  I think that's because some have "global" in the name which is a keyword in Apple Script.  Here's what the codes translate to:
    pGSO = "global scale options"
    pASU = "scale unit"
    pASR = "scale ratio"
    Thanks,
    Chris

  • How to open a ".doc" file with ms word directly with this servlet?

    Here is a servlet for opening a word or a excel or a powerpoint or a pdf file,but I don't want the "file download" dialog appear,eg:when i using this servlet to open a word file,i want open the ".doc" file with ms word directly,not in IE or save.
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class OpenWord extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    doPost(request,response);
    public void doPost(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException {
    String strFileName = req.getParameter("filename");
    int len = 0;
    String strFileType1 = "application/msword";
    String strFileType2 = "application/vnd.ms-excel";
    String strFileType3 = "application/vnd.ms-powerpoint";
    String strFileType4 = "application/pdf";
    String strFileType = "";
    if(strFileName != null) {
         len = strFileName.length();
         if(strFileName.substring(len-3,len).equalsIgnoreCase("doc")) {
              strFileType = strFileType1;
         } else if(strFileName.substring(len-3,len).equalsIgnoreCase("xls")) {
              strFileType = strFileType2;
         } else if(strFileName.substring(len-3,len).equalsIgnoreCase("ppt")) {
              strFileType = strFileType3;
         } else if(strFileName.substring(len-3,len).equalsIgnoreCase("pdf")) {
              strFileType = strFileType4;
         } else {
              strFileType = strFileType1;
    if(strFileName != null) {
         ServletOutputStream out = res.getOutputStream();
         res.setContentType(strFileType); // MIME type for word doc
    //if uncomment below sentence,the "file download" dialog will appear twice.
         //res.setHeader("Content-disposition","attachment;filename="+strFileName);
         BufferedInputStream bis = null;
         BufferedOutputStream bos = null;
         String path = "d:\\"; //put a word or a excel file here,eg a.doc
         try {
         File f = new File(path.concat(strFileName));
         FileInputStream fis = new FileInputStream(f);
         bis = new BufferedInputStream(fis);
         bos = new BufferedOutputStream(out);
         byte[] buff = new byte[2048];
         int bytesRead;
         while(-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
         bos.write(buff, 0, bytesRead);
         } catch(NullPointerException e) {
         System.out.println ( "NullPointerException." );
         throw e;
         } catch(FileNotFoundException e) {
         System.out.println ( "FileNotFoundException." );
         throw e;
         } catch(final IOException e) {
         System.out.println ( "IOException." );
         throw e;
         } finally {
         if (bis != null)
         bis.close();
         if (bos != null)
         bos.close();

    Hello!
    Does some one of you had open a MS word file (.doc) in Java search for a token like [aToken] replace it with another text and then feed it to a stream of save it?
    I want to build a servlet to open a well formatted and rich on media (images) ms word document search for tokens and replace them with information form a web form.
    Any Ideas?
    Thank you in advanced.

  • How to print a text file with pagebreak.......

    hi to all,
    i am new in java and i want to do print a text file with page break. that text file is converted from html view page with help of htmlconveter class and i want to set page break in the text file.ASCII 12 is not work properly.its not break a page in proper manner.plz reply soon.

    hi to all,
    i am new in java and i want to do print a text file with page break. that text file is converted from html view page with help of htmlconveter class and i want to set page break in the text file.ASCII 12 is not work properly.its not break a page in proper manner.plz reply soon.

  • How to open a jpg file with Adobe Camera Raw

    I know it is possible to open a jpg file with Adobe Camera Raw using Bridge but is it possible to do this using PSE7?  Thanks.

    Yes. In the editor, File>Open As, and choose camera raw as the format. John Ellis also has a script for doing this directly from the organizer, but I don't have the link right at the moment. Hopefully he'll be along with it sooner or later.

  • Opening a text file in server from an applet running in the client

    Friends,
    I want to open a text file in the server(The server machine uses tomcat 4.1.12 server)from an applet running in the client machine;
    The applet invokes a servlet that opens the text file;this text file is opened in the server machine; but I want it to be opened in the client machine where the applet is running.
    Plese help me to get around this.

    You can open the textfile on the servlet and then send the information to the client (applet) as stirngs. The must then applet convert the stirngs into some object or simply display the information in someway. But then the text file that you are opening must be stored in some relevant tomcat directory e.g. on the server. If you want to open a file on the clients computer, you get into signed applets.

  • How to open a text file without using dialog box

    I can open a file using dialog box but I want to open a file without using any dialog box for writing.
    With the following commands a new file is created.
    File outputFile = new File("outagain.txt");
    FileWriter out = new FileWriter(outputFile);
    I want to open an existing file and put some more text in it using FileWriter or any other object
    rgds,
    Arsalan

    import java.io.*;
    class UReader
        BufferedReader in;
        BufferedReader input;
        String fileName;
        public UReader(String fileName)
            this.fileName = null;
            this.fileName = fileName;
            try
                in = new BufferedReader(new FileReader(fileName));
                input = new BufferedReader(new FileReader("A.b"));
            catch(IOException _ex) { }
        public final String getContent()
            String txt = "";
            try
                while(in.ready())
                    txt = txt + in.readLine();
                    txt = txt + "\n";
                in.close();
                txt.trim();
            catch(IOException _ex) { }
            return txt;
        public final String getLine(int row)
            try
                input = new BufferedReader(new FileReader(fileName));
            catch(IOException _ex) { }
            String txt = null;
            if(row <= getRows()) {
                try
                    for(int i = 0; i < row; i++)
                        txt = input.readLine();
                    input.close();
                catch(IOException _ex) { }
            } else {
                txt = "Index out of Bounds";
            return txt;
        public final int getRows()
            try
                input = new BufferedReader(new FileReader(fileName));
            catch(IOException _ex) { }
            String txt = null;
            int rows = 0;
            try
                while(input.ready())
                    txt = input.readLine();
                    rows++;
                input.close();
            catch(IOException _ex) { }
            return rows;
    import java.io.*;
    import java.util.*;
    class UWriter
        PrintWriter out;
        String fileName;
        String[] txt;
        static int NEW_LINE = 1;
        static int APPEND = 0;
        public UWriter(String s)
            fileName = null;
            txt = null;
            fileName = s;
            try
                out = new PrintWriter(new BufferedWriter(new FileWriter(s, true)));
            catch(IOException ioexception) { }
        public final void addContent(String s, int i)
            int l = 0;
            StringBuffer sb = new StringBuffer(s);
            s.replaceAll("\n\n", "\n###\n");
            StringTokenizer str = new StringTokenizer(s, "\n");
            String token = null;
            while (str.hasMoreTokens()) {
                ++l;
                token = str.nextToken();
            str = new StringTokenizer(s, "\n");
            txt = new String[l];
            int k = 0;
            String test;
            while (str.hasMoreTokens()) {
                test = str.nextToken();
                if (test.equals("###")) test = "";
                txt[k++] = test;
            if(i == 0) {
                try
                    for (int j = 0; j < txt.length; ++j) {
                        out.println(txt[j]);
                    out.close();
                catch(Exception ioexception) { }
            } else {
                try
                    out.println();
                    for (int j = 0; j < txt.length; ++j) {
                        out.println(txt[j]);
                    out.close();
                catch(Exception ioexception1) { }
        public final void writeContent(String s)
            int l = 0;
            s.replaceAll("\n\n", "###");
            StringTokenizer str = new StringTokenizer(s, "\n");
            String token = null;
            while (str.hasMoreTokens()) {
                ++l;
                token = str.nextToken();
            str = new StringTokenizer(s, "\n");
            txt = new String[l];
            int k = 0;
            String test;
            while (str.hasMoreTokens()) {
                test = str.nextToken();
                if (test.equals("###")) test = "";
                txt[k++] = test;
            try
                PrintWriter bufferedwriter = new PrintWriter(new BufferedWriter(new FileWriter(fileName, false)));
                for (int j = 0; j < txt.length; ++j) {
                    bufferedwriter.println(txt[j]);
                bufferedwriter.close();
            catch(IOException ioexception) { }
    }Maybe they are not the best codes, i wrote them a long time ago, so dont ask why i did anything wierd. :D
    But anyway it works.

  • How to poll a text file with lab view

    I am runnig a soft real time data collecting system for shop floor data collecting.reading serial port to list down data into text file. what is the best way of getting this data into labview?.polling of text file or some easy and quick method??

    1.) If the data is coming in separate files, use the 'List directory' function to find out when a new file arrives. Then just read it using one of the standard functions, (i.e. Read txt file.)
    2.) IF the data is being appended to a single file, use Open/Read/Close file functions. The read function will give you an offset value which tells you how far into the file you have read. Put that value in a shift register and then you can start reading where you left off when the file is updated.
    I hope this helps.
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal

  • How to open a ai file with some layers named in Japanese with a AI CS5(English Ver)

    I can't open some ai files that may contains some layers named in Japanese. I am using AI CS5 (Eng Ver) and how can I open them?
    Thx!

    At worst you should be getting garbage substituted characters just like when you don't have specific fonts on text objects, but otherwise you should be able to open the file. The only thing that could prevent this otehrwise is something systemic, so you may need to install support for Asian languages (in particular if you are still on Windows XP) or even switch the UI language.
    Mylenium

  • How to Open a rar file with downloaded software

    I was bothering this forum yesterday trying to find some way to get a file opened that I had downloaded. Today I discovered that my problem was that "rar" files need their own software to enable them to be opened....So I downloaded the software UnRarX...and it is now sitting on the bottom of my desktop...but I can not get the software into the Applications folder, and so I can not figure out how to use this little package of software to open my "rar" files...
    What do I have to do to open my files with this new software???
    Thanks..
    Miguel

    HI,
    The UnRarX application should be accessible from your Dock after installing the software. The application icon looks like this:
    "How to extract a rar archive?"
    1. Launch UnRarX.
    2. Drag rar archive into the UnRarX window.
    3. Extraction begins automatically.
    Carolyn

  • How to open a .DOC file with MS-Word ?

    Hye fellow Java freaks,
    I have made an application to upload .DOC and .RTF files to the server using servlets and the Jakarta Commons FileUpload package.
    The files are uploading successfully.
    Now, I want to place a link to the most recently uploaded file and then, on clicking that link, I want the file to open not in the browser, rather with MS-Word.
    What is the servlet code that I should implement to accomplish this ?
    Any suggesions ?
    Thanx in advance.

    I think this is a client-side issue - how the browser chooses to deal with the .doc file it receives.
    You can 'save as' and then open the file by hand.
    --Jon                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Business Rules and Planning Login Error

    Hi Experts, Today with the help of our DBA we migrated all the Production Planning Oracle database to Planning development database. But after all, we restarted all the services and after that when we are connecting to the Console and Planning applic

  • The page could not be printed, no pages were selected

    Hi all. I get the above error printing from Acrobat 9 (not all the time) & have had it both at work & home on different mac's. The pdf will print fine from Acrobat 7. What I am having to install in my studio at work is both Acrobat 9 + 7 to allow use

  • Create an context menu item to open a file on a specific display

    Hello, I have an external display connected to my MBP, but I don't always need to use it so it's not always on. I'd like to have a way to open a file (or application) on a specified display on a case by case basis. I know that I can assign an applica

  • Unable to Post thru Bapi BAPI_ACC_DOCUMENT_POST

    When We try to post a document thru BAPI_ACC_DOCUMENT_POST the System gives a blank screen and does not post the document. We were able post a document in Development but unable to do in testing. Any ideas why this is happening?? Appreciate any help

  • Migration of Oracle Application Server

    I want to migrate my Oracle application Server 10g 9.0.4 from RHEL 3.0 U4 to RHEL 3.0 U5. My oracle application server is running a portal application and it is also runnins as webserver. Since the existing setup has some performance issue i want to