Running multiple commands in command prompt

Hi
I am having the following scenario
open command prompt
open xilinx command prompt
switch to xmd console
run a set of commands
print the final output to screen
I am having the following doubts
Can system exec.vi take multiple commands as standard input?
If yes what is the delimiter?
If no what other options I have to achieve my goal
Thanks

Why not write a batch file and start that with System Exec?
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • How to use addKeyListener in a program running using command prompt

    Does anyone have any idea how to add the addKeyListener to a program running using command prompt.
    Let me explain how the program run.
    The program is start and accept call from other program. But from time to time, I need to issue some command by pressing the keyboard, let say, ESC is closed the program, F1 is showing the stated. F2.... (This is all need to run in the command prompt windows)
    My problem is this program does not have any gui interface, so how can it be added?
    i do it this way
    public void key(){          
    addKeyListener(this);
    But it have compile error.
    mainServerImpl.java:87: cannot resolve symbol
    symbol : method addKeyListener (mainServerImpl)
    location: class mainServerImpl
    addKeyListener(this);
    I did implement KeyListener. But just don't know how to solve this error.
    can anyone tell me how to solve it or point me a source that can help.
    Thank in advance!
    Regards,
    Tai Tan

    Write your own Thread, to do this:
    public class KeyThread extends Thread {
       public void run {
          while(true) {
             int i = System.in.read();
             if(i == 123) {
                break; // to stop the thread
    // in your main:
    Thread keyThread = new KeyThread();
    keyThread.start(); // calls run() of the thread

  • How to run a command prompt " command " through java code

    hi all,
    There is a command
    "java -jar selenium-server.jar -interactive"
    which i am running through command prompt after going to D:\MyFolder\Examples .
    i want to execute this command using java code .please help

    This has already been answered in your other two threads on this topic - http://forum.java.sun.com/thread.jspa?threadID=5221221&messageID=9898287#9898287 and http://forum.java.sun.com/thread.jspa?threadID=5221223&messageID=9898290#9898290.
    For some reason you don't want to read the reference that tells you exactly how to do what you want and how to avoid the pitfalls - http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html .

  • Is it possible to run a command prompt(or DOS Command) through flash and run a Activex(.OCX) file from flash

    Hi all
        Is it possible to run a command prompt(or DOS Command) through flash.If it possible please guide me to do that throug AS 3.0.
       and
    Is it Possible to run a activex (.OCX) file from flash. If it is so please guide me the way to do it
    Thanks and Advance
    Sankar.M.S

    Or create a desktop shortcut (in Windows) or an application launcher ( in Linux GUI).

  • Is it possible to run a command prompt(or DOS Command)  and Activex File(.OCX)

    Hi all
    Is it possible to run a command prompt(or DOS Command) through flash.If it possible please guide me to do that throug as 2.0. and is it possible to run a Activex File(.OCX) through flash.
    Thanks and Regards
    Sankar.M.S

    Or create a desktop shortcut (in Windows) or an application launcher ( in Linux GUI).

  • Running multiple commands in SCCM 2012 R2

    Dear Professionals 
        I am really new in SCCM 2012 an i did alot of self study but there are a few things are really killing me ... 
    how i run Running multiple commands in a task sequence 
    Diskpart
    Sel Disk 0
    clean
    Exit
    And also in what step i should create this command line to solve error code 0x80070070
    Thank you 

    i will try that .. but i have been told that command may not fix the problem i have ... 
    is there another way to only format c:\ and leave the other partitions as it is ??
    i am booting from PXE and use the USMT TS is that correct or i must run it from software Center ??
    in the text file i only copy and paste the commands as it is or i should paste it in a specific form ?? like
    Diskpart
    Sel Disk 0
    clean
    Exit 
    Or 
    Diskpart & Sel Disk 0 & clean
    & Exit 
    from what i read online i think the main problem is that the partition can not be wiped 
    Thank you so much for your time and patience 
    Yahia Zouhair

  • How java runs in command prompt and why java runs on it

    how java runs in command prompt and why java runs on it

    command prompt was used before the development of IDEs like RAD,eclipse etc.
    its still used for better understanding of the compilation and errors.
    type the java file and save the file(source file) in the bin folder of ur jdk environment with extension .java. the source file must be the one that has the main method declared.
    in the cmd prompt screen , set the path of bin folder.
    eg:C:/program files/jdk(some version)/bin/...
    for compilation,type:
    javac (source file_name).java and press enter
    for running the file:
    java source file_name

  • Encountering a RunTime error when I try running from command prompt

    When I try to load my class from the command prompt I get the error:
    Exception in thread "main" java.lang.NoClassDefFoundError: MiniTriangle
    Since this seems like a pretty basic error, I'm hoping there's a black and white solution to it. Unfortunatly I don't have the slightest idea what that might be.
    Any help would be appreciated, thanks in advance!!!

    I'm pretty new to this myself but have encountered this error before. I've found it happens when you try to run the programme and the class name isn't the same as the file name. So if you named the text file when you wrote the code MiniTriangle when you compile it you will get a file called MiniTriangle.class which is what you are trying to run. However if you inadvertently misspelled the class definition in the code and entered say
    class MiniTringle {
    you would get the error you are experiencing when you try to run MiniTriangle.class
    Hope this helps

  • Got an error while import script run in command prompt in R12

    hi '
    i am running the below script in command prompt in R12, but it will give an error
    that error name:
    'import' is not recognized as internal or external command,
    operable program or batch file.
    import C:\JDeveloper10g\jdevhome\jdev\myprojects\flsm\oracle\apps\po\per\webui\FlsmCreationPG.xml -rootdir C:\JDeveloper10g\jdevhome\jdev\myprojects -username XXFLS -password xxfls -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cph-oadb-tst22.dk.flsmidth.net)(PORT=1543))(CONNECT_DATA=(SID=TST22)))"
    could you please help me on this.
    Regards,
    Muthu

    Muthu,
    The import file directory is not in the path,
    So run the script with full path,
    <JDEV_DIR>\jdevbin\jdev\bin\import
    Eg.
    <JDEV_DIR>\jdevbin\jdev\bin\import <JDEV_DIR>\jdevbin\jdev\myclasses\xxt\oracle\apps\pon\registration\webui\XXTSupplierRegistrationPG.xml -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<DB_HOST_NAME>)(PORT=<DB_PORT>))(CONNECT_DATA=(SID=<DB_SID>)))" -rootDir <JDEV_DIR>\jdevbin\jdev\myclasses\ -rootPackage /
    For scripts check this URL,
    http://apps2fusion.com/at/61-kv/331-oa-framework-scripts
    Thanks,
    With regards,
    Kali
    OSSI.

  • Run in command prompt

    Hi,
    I have a java application project which has a package with my code and one more package generated by web proxy.How can i run this in command prompt.
    Or how can i create an executable jar with all required libraries and everything.

    It's not recognizing javac, probably because you didn't set the PATH.
    PATH="C:\Program Files\Java\jdk1.5.0_12\bin"Adjust it to the location of your bin folder.

  • Runtime.exec() I need to run a command prompt command from java.

    the code i have that doesn't seem to work is:
    String driveloc = System.getProperty("user.dir").substring( 0, 1 );
            String path = jTextFieldPath.getText();
            String path2 = jTextFieldPath.getText().substring(0, jTextFieldPath.getText().length()-3) + "lst";
            String[] cmd = { "cmd.exe", "/" + driveloc, "ASMtools\\AS11 " + path + " -L >" + path2};
            txt_mf.append( cmd[3] );
            try {
                Process np = Runtime.getRuntime().exec( cmd );
            catch( java.io.IOException ioe) {
                //error
            }jTextFieldPath.getText() contains the path of the file saved by my program.
    the line of code i am trying to run is:
    AS11 FILE1 -L FILE2this line compiles the asm file and converts it to a lst creating an s19 file in the process. AS11 is an exe that aids the command prompt much like javac.
    If you could help me figure this out it would be great.
    Thanks in advance,
    -Juke

    String driveloc =
    System.getProperty("user.dir").substring( 0, 1 );
    String[] cmd = { "cmd.exe", "/" + driveloc,
      "ASMtools\\AS11 " + path + " -L >" + path2};Are you sure you want to invoke cmd.exe with the switch /c or /d or whatever depending on System.getProperty("user.dir") ?
    Starts a new instance of the Windows 2000 command interpreter
    CMD [A | /U] [Q] [D] [E:ON | /E:OFF] [F:ON | /F:OFF] [V:ON | /V:OFF]
        [[S] [C | /K] string]
    /C      Carries out the command specified by string and then terminates
    /K      Carries out the command specified by string but remains
    /S      Modifies the treatment of string after /C or /K (see below)
    /Q      Turns echo off
    /D      Disable execution of AutoRun commands from registry (see below)
    /A      Causes the output of internal commands to a pipe or file to be ANSI
    /U      Causes the output of internal commands to a pipe or file to be
            Unicode
    /T:fg   Sets the foreground/background colors (see COLOR /? for more info)
    /E:ON   Enable command extensions (see below)
    /E:OFF  Disable command extensions (see below)
    /F:ON   Enable file and directory name completion characters (see below)
    /F:OFF  Disable file and directory name completion characters (see below)
    /V:ON   Enable delayed environment variable expansion using c as the
            delimiter. For example, /V:ON would allow !var! to expand the
            variable var at execution time.  The var syntax expands variables
            at input time, which is quite a different thing when inside of a FOR
            loop.
    /V:OFF  Disable delayed environment expansion.

  • SignTool.exe verify /pa returns exit code 1 from the code but works fine while running from command prompt

    Hi,
    I am using SignTool.exe from a new Process() to verify a codesigned assembly and it returns the exit code 1 whereas it returns exit code 0 while i run the same from Visual Studio Command prompt. Please let me know your thoughts...
    Here is my code snippet from VS2012 ultimate on Win7 PC.
    p = new Process();
                p.StartInfo.FileName = "C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Bin\\SignTool.exe";
                string args = @"verify";
                p.StartInfo.Arguments =  args + " "+ "/pa " + "/v "+ name;
                p.Start();
                p.WaitForExit();
                pexitcode = p.ExitCode;
    //name = "C:\\Users\\v-maparn\\Documents\\Visual Studio 2012\\Projects\\CodesignVerification\\CodesignVerification\\bin\\Release\\Microsoft.IT.Core.dll"
    Thanks,
    Mani

    Hi Amy,
    Thanks for your reply. I am receiving the exit code 1 by the Process even though the SignTool is able to successfully verify the assembly. I ran the below command from command prompt and received no errors or warnings. I assume the exit code should be 0.
    I have also verified that this assembly has digital signature embedded as you can see from the output.
    output:
    C:\Windows\system32>signtool.exe verify /pa /v "C:\Users\v-maparn\Documents\Visu
    al Studio 2012\Projects\CodesignVerification\CodesignVerification\bin\Release\Mi
    crosoft.IT.Security.UI.SystemSecurityManagement.SSMUIWebHost.dll"
    Verifying: C:\Users\v-maparn\Documents\Visual Studio 2012\Projects\CodesignVerif
    ication\CodesignVerification\bin\Release\Microsoft.IT.Security.UI.SystemSecurity
    Management.SSMUIWebHost.dll
    Signature Index: 0 (Primary Signature)
    Hash of file (sha1): 1B58113B218260837A6B850561538A804B034F2A
    Signing Certificate Chain:
        Issued to: Microsoft Root Certificate Authority
        Issued by: Microsoft Root Certificate Authority
        Expires:   Sun May 09 15:28:13 2021
        SHA1 hash: CDD4EEAE6000AC7F40C3802C171E30148030C072
            Issued to: Microsoft Code Signing PCA
            Issued by: Microsoft Root Certificate Authority
            Expires:   Mon Aug 31 14:29:32 2020
            SHA1 hash: 3CAF9BA2DB5570CAF76942FF99101B993888E257
                Issued to: Microsoft Corporation
                Issued by: Microsoft Code Signing PCA
                Expires:   Thu Apr 24 14:33:39 2014
                SHA1 hash: 108E2BA23632620C427C570B6D9DB51AC31387FE
    The signature is timestamped: Mon Dec 30 02:58:12 2013
    Timestamp Verified by:
        Issued to: Microsoft Root Certificate Authority
        Issued by: Microsoft Root Certificate Authority
        Expires:   Sun May 09 15:28:13 2021
        SHA1 hash: CDD4EEAE6000AC7F40C3802C171E30148030C072
            Issued to: Microsoft Time-Stamp PCA
            Issued by: Microsoft Root Certificate Authority
            Expires:   Sat Apr 03 05:03:09 2021
            SHA1 hash: 375FCB825C3DC3752A02E34EB70993B4997191EF
                Issued to: Microsoft Time-Stamp Service
                Issued by: Microsoft Time-Stamp PCA
                Expires:   Wed Feb 11 14:11:31 2015
                SHA1 hash: D967AB4CF991F11DA6E318C880F1AF1A9C8D2C7C
    Successfully verified: C:\Users\v-maparn\Documents\Visual Studio 2012\Projects\C
    odesignVerification\CodesignVerification\bin\Release\Microsoft.IT.Security.UI.Sy
    stemSecurityManagement.SSMUIWebHost.dll
    Number of files successfully Verified: 1
    Number of warnings: 0
    Number of errors: 0
    C:\Windows\system32>
    Thanks,
    Mani

  • Jar run from command prompt?

    Hi !
    How do I run my Jar from the command prompt window?
    my jar's name is " javaproject 7"
    Thanks!

    Java application launcher documentation:
    http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/java.html

  • Scanner works in JCreator but doesn't when run from Command Prompt?

    Can someone tell me why I can run this program in JCreator with no problems, but when I run it with the Command prompt it throws a java.util.InputMismatchException if I input anything?
    import java.util.Scanner;
    public class tester {
        public static void main(String[] args) {
            Scanner in = new Scanner(System.in).useDelimiter("\n");
            System.out.println("Type either 1 or 2");
            int temp = in.nextInt();
            System.out.println("");
            if (temp == 1)
                 System.out.println("you typed 1");
            if (temp == 2)
                 System.out.println("you typed 2");
            else
                 System.out.println("you typed something else!");
    }

    Try this code it is running correctly on command prompt
    import java.util.Scanner;
    public class tester {
        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            System.out.println("Type either 1 or 2");
            int temp = in.nextInt();
            System.out.println("");
            if (temp == 1)
                 System.out.println("you typed 1");
            if (temp == 2)
                 System.out.println("you typed 2");
            else
                 System.out.println("you typed something else!");
    }

  • RunInstaller fails while running from command prompt

    Hi,
    The runInstaller when run fails from command prompt:
    Starting Installation...
    Starting Oracle Universal Installer...
    Checking installer requirements...
    Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
    Passed
    All installer requirements met.
    Preparing to launch Oracle Universal Installer from /vol2/newtmp/OraInstall2009-05-17_11-02-45PM. Please wait ...Success!
    Done!
    [oracle@saudas oracle]$ Oracle Universal Installer, Version 10.2.0.1.0 Production
    Copyright (C) 1999, 2005, Oracle. All rights reserved.
    Unexpected Signal : 11 occurred at PC=0xF7D617CE
    Function=(null)
    Library=/vol2/newtmp/OraInstall2009-05-17_11-02-45PM/jre/1.4.2/lib/i386/client/libjvm.so
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    I have made a temporary directory logged as root user:
    Then login as root:
    $mkdir /vol2/newtmp
    $chown oracle:oinstall /vol2/newtmp
    $chmod 777 /vol2/newtmp
    Then login as oracle:
    $export TMP=/vol2/newtmp
    $export TEMPDIR=/vol2/newtmp
    Any help will be needful for me
    Thanks and Regards

    user598986 wrote:
    I am using Oracle 10g Server Release 2 64 bitThat's a good start.
    The OS is:Red Hat Linux 64 bit.Which version ?
    Did you set DISPLAY env variable ? Did you set the kernel to the required value ?
    Check again all the prerequisites.
    Nicolas.

Maybe you are looking for

  • Maximum File size in XI

    I have 100 MB file to be transferred through XI. How to check maximum file size limit in XI server. Is thier any tcode for the same?

  • Split in Mapping Program

    Hai, is it possible to use different Mapping programs in one process? For example I use Idoctype ACC_GL_POSTING01 to book some values from 3rd party into R3. So now I have to make a different mapping in according to the booking code coming from 3rd p

  • Error in create_view()

    Hi,     I am getting an error while running a BSP application using MVC...     It is something like this......          Business Server Page (BSP) error          What happened?          Calling the BSP page was terminated due to an error.          SA

  • My iPad screen won't work

    I have an iPad 2 and recently it has stopped working all of a sudden. When i press the power button on my iPad, it turns on but it is just a blank screen and when i turn it off it flashes white. Sometimes when i turn it on my wallpaper flashes on the

  • My Mac won't shut down after upgrading to Panther

    I recently upgraded to Panther 10.3 from Jaguar 10.2.9. After Panther had installed successfully, I used software update and I'm now running Panther 10.3.9. However, since then my Mac won't shut down. It doesn't hang or freeze - it just does nothing