Unable to run a Batch File Operating System Command

Using XI 3.0, I am unable to run a Batch File Operating System Command After Message Processing.
My Batch file:
gpg -se -r BOA3RSKY --armor --passphrase-fd 0 %1 < C:\Progra~1\GNU\GnuPG\gpgin
My Command Line (ID scenario)
exec "cmd.exe /c C:\Progra~1\GNU\GnuPG\boagpg.bat %F"
If I execute
exec "cmd.exe /c type C:\Progra~1\GNU\GnuPG\boagpg.bat >xis.txt"
It displays the contents of boagpg.bat file in xis.txt.
I just don't understand why when I run the batch file, I would expect an %F.asc encrypted file in the same directory as the %F unencrypted file.
Any ideas?
or will I need Basis to create commands that will allow me to run GPG from XI Command Line?

Check this links if its helpful
http://help.sap.com/saphelp_nw04/helpdata/en/bb/c7423347dc488097ab705f7185c88f/frameset.htm
/people/sap.user72/blog/2004/01/30/command-line-help-utility
Check this thread a similar problem
Process Integration (PI) & SOA Middleware
Note 841704 - XI File & JDBC Adapter: Operating system command
http://service.sap.com/sap/support/notes/841704
Try to see the below links
/people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
OS Command on FTP
OS command line script - Need help
FTP - Run OS Command before file processing
Note: reward points if solution found helpfull
Regards
Chandrakanth.k

Similar Messages

  • Is it possible to call operating system command after file receive?

    Hi expert,
    I'm trying to call operating system command after file receive comm.channel receive a txt file.
    operating system command uses txt file name as parameter.
    Is it possible? How?
    Thanks.

    Hi,
    It should be possible, actually we have two options that are
    1.RUN OS command before message processing
    2.RUN OS command after message processing.
    So you can give the commands in the RUN OS command after message processing.
    Check this links for more info
    http://wiki.sdn.sap.com/wiki/display/XI/SAP%20XI%20File%20Adapter%20OS%20Command%20Line%20Feature
    http://help.sap.com/saphelp_nwpi71/helpdata/en/44/556cb799c93677e10000000a114a6b/content.htm
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417200)ID1690747750DB11724434094963199241End?blog=/pub/wlg/10392
    Regards
    Ramesh

  • Running a batch file - VERY URGENT .. help

    Hi people
    I am attempting to run a batch file from with a JSP page.
    the code i am using is:
    Runtime runtime = Runtime.getRuntime();
    Process process = runtime.exec("cmd.exe /c d:\\uploadfiles.bat");
    This jsp file is located on the c: of a webserver.
    the uploadfiles.bat is located on the d: of the webserver and the code is:
    copy d:\videos\008214?.rm d:\blah
    copy d:\images\008214.* d:\blah
    copy d:\xml\008214.* d:\blah
    cd \blah
    pkzip -es -m 008214.zip *.*
    copy 008214.zip d:\upload\008214.zip
    del 008214.zip
    If I run this batch file from a command line, it works fine, though when I try and call it through my JSP page, it doesnt do anything .. a command window just pops up for a while, and then closes.
    How can I fix this ... I need this quite quickly
    Thanks people

    1) It is O.K. that you see nothing in that console. Its output is captured by Java and is not displayed on the screen.
    In general, that console should not be visible, but actually it behaves differently according to JDK and OS versions (treat that as a feature).
    2). Look at this article:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    It it does not answer your problem, try to search the forums:
    http://search.java.sun.com/search/java/index.jsp?qp=%2Bforum%3A31&nh=10&qt=%2B%22exec%22+-%22Replies%3A+0%22&col=javaforums
    Questions about Runtime.exec() has been asked hundreds of times.
    3) runtime.exec() can execute BAT files. It is not necessary to specify that "cmd /C".

  • Filestream Creation Unable to Open Physical File Operating System Error 259

    Hey Everybody,
    I have run out of options supporting a customer that is having an error when creating a database with a file stream.  The error displayed is unable to open physical file operating system error 259 (No more data is available).  We're using a pretty
    standard creation SQL script that we aren't having issues with other customers:
    -- We are going to create our data paths for the filestreams.  
    DECLARE @data_path nvarchar(256);
    SET @data_path = (SELECT SUBSTRING(physical_name, 1, CHARINDEX(N'master.mdf', LOWER(physical_name)) - 1)
                      FROM master.sys.master_files
                      WHERE database_id = 1 AND file_id = 1);
    -- At this point, we should be able to create our database.  
    EXECUTE ('CREATE DATABASE AllTables
    ON PRIMARY
        NAME = AllTables_data
        ,FILENAME = ''' + @data_path + 'AllTables_data.mdf''
        ,SIZE = 10MB
        ,FILEGROWTH = 15%
    FILEGROUP FileStreamAll CONTAINS FILESTREAM DEFAULT
        NAME = FSAllTables
        ,FILENAME = ''' + @data_path + 'AllTablesFS''
    LOG ON
        NAME = AllTables_log
        ,FILENAME = ''' + @data_path + 'AllTables_log.ldf''
        ,SIZE = 5MB
        ,FILEGROWTH = 5MB
    GO
    We are using SQL Server 2014 Express.  File streams were enabled on the installation SQL Server.  The instance was created successfully and we are able to connect to the database through SSMS. The user is using an encrypted Sophos. 
    We have tried the following:
    1. Increasing the permissions of the SQL Server server to have full access to the folders.
    2. Attempted a restore of a blank database and it failed.
    There doesn't seem to be any knowledge base articles on this particular error and I am not sure what else I can do to resolve this.  Thanks in advance for any help!

    Hi Ryan,
    1)SQL Server(any version) can't be installed on encrypted drives. Please see a similar scenario in the following link
    https://ask.sqlservercentral.com/questions/115761/filestream-and-encrypted-drives.html
    2)I don't think there is any problem with permissions on the folder, if the user can create a database in the same folder. Am not too sure. Also see the article by
    Jacob on configuring the FILESTREAM for SQL Server that describes how to configure FILESTREAM access level & creating a FILESTREAM enabled database
    Hope this helps,
    Thanks
    Bhanu 

  • File Receiver Adapter:Run Operating System COmmand after message Processig:

    Dear All,
    I have gone through this link
    [http://help.sap.com/saphelp_nw2004s/helpdata/EN/e3/94007075cae04f930cc4c034e411e1/content.htm]
    But i have a problem.
    In the scenario which we have, File name is DYNAMICALLY GENERATED by a UDF
    I want to call the file at run time after message processing via Command Line and execute some os commands.
    But since the file name is Dynamic....How will i call the file at run time in Command Line:
    SYNTAX: %f(FileName)
    How will i specify the file name in the above syntax as the file name is Dynamic and not constatnt.
    Please Advice.
    Senthilprakash.

    Dear All,
    Yes just now i got the answer from this thread[OS command line script - Need help;
    Actually i have another doubt now
    In REVEIVER FILE ADAPTER:
    when we give Run Operating system Command After Message processing
    does the OS command get executed after the output file is placed in the Receiver folder/server or before its placed in the receiver folder?
    Regards,
    Senthilprakash.

  • Run operating system command for sender File adpter (NFS)

    Hi All,
    iam doing a file to RFC scenario, using 'Run operating system command' in sender file adapter to change the file name while archiving (after processing completed).
    I mention OS command like this:
    sample_server\scripts\Test\Rename.bat"
    Rename.bat file calls a 'perl script' code.
    when i run interface, could see below statement in adapter log ->
    "Execute OS command "
    sample_server\scripts\Test\Rename.bat"
    but the script was not run and file name was not changed.
    Please advice what could be the problem?
    Does this mean script executed successfully?
    Do i need install perl software on XI server, even perl script (.bat file) is executing on sample_server?
    Thanks in advance..
    Regards,
    Rajesh

    Hi,
    Just check the following URL and give it a try again :-
    Executing Unix shell script using Operating System Command in XI
    Hope this info Helps..
    Regards,
    Aditya

  • Operating system command in file receiver adapter

    Hi,
    How to use the Run Operating system command after message processing option in the parameters tab of the file receiver adapter.
    I am working on a scenario wherein a batch file needs to be invoked after the file is written on the file system.
    So how do i invoke this batch file from the file reciever adapter ( Run Operating system command after message processing ).

    Hi,
    did you see this page?
    http://help.sap.com/saphelp_nwpi71/helpdata/en/44/556cb799c93677e10000000a114a6b/content.htm
    it shows all you need to know
    Regards,
    Michal KRawczyk

  • Running a Batch File on another Server with an Oracle Job

    hi, i have the following code
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'test_job_bat',
    job_type => 'EXECUTABLE',
    job_action => '\\10.1.1.63\test\test.bat',
    enabled => true,
    comments => 'test bat'
    END;
    So i want to run a batch file, which lies on another pc in the network
    The code runs, without a failure.
    The bat file just contains "MD D:\bla" .
    When i run the code, no bla directory is created, so it seems that the batch file never ran.
    i approved read/write on the test folder. (Windows 7 machine)
    any ideas?
    Edited by: user1067632 on 31.05.2010 05:03
    in dba_scheduler_job_run_details the job is listed as FAILED:
    ORA-27370: Job-Unterprozess konnte einen Job vom Typ EXECUTABLE nicht starten
    ORA-27300: BS-abhängiger Vorgang accessing execution agent mit Status: 2 nicht erfolgreich
    ORA-27301: BS-Fehlermeldung: Das System kann die angegebene Datei nicht finden.
    ORA-27302: Fehler aufgetreten bei: sjsec 6a
    ORA-27303: Zusätzliche Informationen: Das System kann die angegebene Datei nicht finden.
    Edited by: user1067632 on 31.05.2010 05:16

    ok sorry, i made my testjob run, the OracleJobScheduler was not started.
    But now i ran into an another Problem.
    Now i want to java bla.jar in my batch, and got that new error
    ORA-27369: Job vom Typ EXECUTABLE nicht erfolgreich mit Exit-Code: Unzulässige Funktion.
    STANDARD_ERROR="Unable to access jarfile start.jar"
    anything to consider when accessing .jar files in my batch?
    edit:
    there was a classpath problem.
    Edited by: ginkgo on 01.06.2010 04:29

  • Trying to run a batch file in ODI and the file is on a windows network drive.

    Hi,
    I'm trying to run a batch file that is located on a windows shared drive for the ODI server. When I try to run the file through OS command by giving the file path in the "command line". I get the error "
    ODI-1226: Step fails after 1 attempt(s).
    ODI-1242: Operating system command execution fails."
    Please let me know if this can be done.

    Hi,
    First try to execute your batch file, if it is executing as expected.
    Then use OdiOSCommand tool and give full path of script and also give a path to create error file & out file.
    Execute the batch now via OdiOSCommand, if it fails then you will receive error message in Error file.
    Also check if you have rights to script being executed via ODI.
    Thanks,
    DK

  • File Adapter 7.11 - set operating system command line dynamically

    Hi,
    is there any way to set the "Operating System Command Line" in the file adapter as ASMA / dynamic attribute?
    I need to set  a command line exec depending on some XSL mapping values.
    thx
    holger

    hi,
    >>>is there any way to set the "Operating System Command Line" in the file adapter as ASMA / dynamic attribute?
    >>>I need to set a command line exec depending on some XSL mapping values.
    think about this approach:
    you put the XSL values into the filename after the real name of the file
    in the batch script you use those values in order to execute a dynamic exe command
    after processing you just change the name of the file in the script by removing the xsl values
    simple ? I think so
    Regards,
    Michal Krawczyk

  • Operating System Command After File Processing in Sender File Adapter

    Hello guys,
    actually we have different interfaces, and the client to take all the files from only one directory, for example D:/DPI.
    Unitl now we had one adapter for every file with the content conversion, so we didn't have problems with that. Now we have the problem that we sould maintain an order processing files.
    We thougth that an idea could be to execute one file pointing to D:/DPI and at the Operating System Command put like: copy D:/DPI/file.txt D:/DPI/outbound/file.txt, so when file is executed, we move the next file to another directory where is pointing the adapter. Doing this we have an error on the adapter giving us the message: Could not process due to error: java.lang.NullPointerException
    We are using a Windows.
    There is anyway to do in our way, or there is a better solution to resolve this problem?
    Any other idea to do this?
    Many thanks in advance.
    Regards,
    Xavi.

    Helo Guys,
    maybe I haven't explained well.
    We have one directory with different files. We have one adapter for every file( we need for the content conversion ) using NFS and all the adapters are pointing to the same directory.
    The problem is that if we have files A.txt, B.txt and C.txt we need to process in an order.
    And the problem we see is that for every file we have one adapter, so for example if we process file A.txt with one adapter, when this part is finished, we want to process file B.txt with another adapter, and the same for the rest of the files.
    So the idea we had is to create another directories, and when A.txt has finished move file B.txt to another directory.
    However this way is not running, if we log on the PI machine and execute cmd, we can do a copy of one file from one directory to another, but when we put this sentence in the adapter in OS command if we see the adapter log we see an error executing the OS command, but we don't know what is the error, there is no more information.
    There is any way to do this or maybe we have to manage in a different way?
    Many thanks in advance.
    Regards,
    Xavi.

  • RUN OPERATING SYSTEM COMMAND BEFORE MESSAGE PROCESSING

    hi.
    just i want to know what is the purpose of run operating system command before message processing,after message processing under file sender adapter.
    waiting for your great answer.
    bye.
    regards.
    seeta ram.

    Hello Seeta,
    let me see if I give it using a simple scenario that I implamented : i nedd to transfer a very large file from one server to the other by XI.
    to save space and network traffic I use an OS command before picking up the file to run a zip command to zip the file.
    after I transfer the file to the target server I run another OS command after the transfer to unzip the file.
    now to your second question:
    the before Os command on the target server is used mostly for checks (make sure there isn't a file by that name or backing up existing data)
    and the after sender OS command is usualy for backing up or erasing existing files (cause it is done only after the first part was finished succesfully).
    Uri Lifshitz.
    p.s.
    there was a blog obout this titled "XI as a huge file mover"
    and you can see a description and my scripts at https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/03/additionaltipsforusingXIasahugefiletransfer%28withbatchscripts%29&

  • Problems Force Running a batch file

    Hi There,
    I am trying to force-run a batch file to copy files from a local NBO Appliance to the C:\tmp directory on the user's workstation. The batch file lives at c:\tmp\branding.bat.
    I cant get the batch file to force run. Zen reporting advises that the batch file has distributed and launched successfully, however the files do not copy.
    However, if i click on the icon for the batch file app - the files copy no problem. I have tried running Workstation Associated and (Unrestricted) User Associated as well as Workstation - Force Run as User.
    Path to executable file:
    %*WinSysDir%\cmd.exe
    Parameters:
    /c "c:\tmp\branding.bat"
    Any ideas? The batch file has to refer to the P: drive as the application covers 40 different sites each with their own appliance containing source files.
    Running NBO2 - ZFD 4 Agent 4.0.1.60 - Clientless
    Desktop XP Workstations
    Thanks
    Thax

    Have the app object copy the batch file to the hard drive from the
    server and then run it locally. This should work with a Middle Tier server.
    thax wrote:
    > Hi there,
    >
    > I cant use the actual server name as this is an application which runs
    > through a middle tier server for multiple NBO sites so therefore needs to
    > use the P: reference...
    >
    >>>> kokoo<[email protected]> 9/03/2006 12:37 >>>
    >
    > TRY edit Scrirts:
    > #\\FS_SERVER_name\VOL\BATCH.BAT
    >
    > edit batch file:
    > xcopy "p:\nal\wxp\ZenPolicies\Branding\*.*" "C:\tmp\ZenPolicies\Branding\"
    > /s /v /e /y
    > ==>
    > xcopy p:\nal\wxp\ZenPolicies\Branding\*.* C:\tmp\ZenPolicies\Branding\ /s
    > /v /e /y
    >
    > "thax" <[email protected]>
    > *******:[email protected]...
    > Hi Jeremy,
    >
    > xcopy "p:\nal\wxp\ZenPolicies\Branding\*.*" "C:\tmp\ZenPolicies\Branding\"
    > /s /v /e /y
    > pause
    >
    > Thax
    >
    > >>> Jeremy Mlazovsky<[email protected]> 8/12/2005 00:20
    >
    > Can we see the contents of your batch file?
    >
    > thax wrote:
    > > Hi There,
    > >
    > > I am trying to force-run a batch file to copy files from a local NBO
    > > Appliance to the C:\tmp directory on the user's workstation. The batch
    >
    > > file lives at c:\tmp\branding.bat.
    > >
    > > I cant get the batch file to force run. Zen reporting advises that the
    >
    > > batch file has distributed and launched successfully, however the files
    >
    > > do not copy.
    > >
    > > However, if i click on the icon for the batch file app - the files copy
    >
    > > no problem. I have tried running Workstation Associated and
    > > (Unrestricted) User Associated as well as Workstation - Force Run as
    > User.
    > >
    > >
    > > Path to executable file:
    > >
    > > %*WinSysDir%\cmd.exe
    > >
    > > Parameters:
    > >
    > > /c "c:\tmp\branding.bat"
    > >
    > > Any ideas? The batch file has to refer to the P: drive as the
    > > application covers 40 different sites each with their own appliance
    > > containing source files.
    > >
    > > Running NBO2 - ZFD 4 Agent 4.0.1.60 - Clientless
    > >
    > > Desktop XP Workstations
    > >
    > > Thanks
    > >
    > > Thax
    > >
    >
    >
    Jeremy Mlazovsky
    Senior System Engineer - Enterprise Desktop
    UDit-Central Hardware Systems & Network Storage
    University of Dayton
    http://forge.novell.com/modules/xfmod/project/?udimage
    http://vmpconfig.sourceforge.net/
    http://regeditpe.sourceforge.net

  • Running a batch file kept on the server

    Hi ,
    I need to upload a file onto the application server then i have to call a batch file from my ABAP code kept on the same server .
    The batch file takes 3 inputs the uploaded filename onto the server the new file name ( that can be any name ) and the delete flag parameter ( 0 or 1 ).
    Is there any function module to do the same ??

    Hi,
    Follow the steps:
    1) Define external operating system command say zcopytm1 using SM69 by using the following parameters:
    Command name                            Operating system       Type
    ZCOPYTM1                                Windows NT             Customer
    Operating system command
    e:\tm1out\tm1ph.bat
    Parameters for operating system command
    Leave this blank
    tm1ph.bat is the batch file which it will execute.
    2) First test it using SM49. Once satisfied use the following code to execute it thru ABAP:
    DATA: BEGIN OF t_copy OCCURS 1.
            INCLUDE STRUCTURE btcxpm.
    DATA: END OF t_copy.
    DATA:      statusline LIKE btcxp3-exitstat.
      CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
             EXPORTING
                commandname            = 'zcopytm1'
                status                              = statusline
             TABLES
                exec_protocol                       = t_copy
             EXCEPTIONS
                no_permission                       = 1
                command_not_found                   = 2
                parameters_too_long                 = 3
                security_risk                       = 4
                wrong_check_call_interface          = 5
                program_start_error                 = 6
                program_termination_error           = 7
                x_error                             = 8
                parameter_expected                  = 9
                too_many_parameters                 = 10
                illegal_command                     = 11
                wrong_asynchronous_parameters       = 12
                cant_enq_tbtco_entry                = 13
                jobcount_generation_error           = 14
            OTHERS                              = 15
      CASE sy-subrc.
        WHEN 0.
          MESSAGE s999 WITH 'File has been copied in G:\public\tm1ph'.
        WHEN 1.
          MESSAGE s999 WITH 'No_permission'.
        WHEN 2.
          MESSAGE s999 WITH 'Command_not_found'.
        WHEN 3.
          MESSAGE s999 WITH 'Parameters_too_long'.
        WHEN 4.
          MESSAGE s999 WITH 'Security_risk'.
        WHEN 5.
          MESSAGE s999 WITH 'Wrong_check_call_interface'.
        WHEN 6.
          MESSAGE s999 WITH 'Program_start_error'.
        WHEN 7.
          MESSAGE s999 WITH 'Program_termination_error'.
        WHEN 8.
          MESSAGE s999 WITH 'X_error'.
        WHEN 9.
          MESSAGE s999 WITH 'Parameter_expected'.
        WHEN 10.
          MESSAGE s999 WITH 'Too_many_parameters'.
        WHEN 11.
          MESSAGE s999 WITH 'Illegal_command'.
        WHEN 12.
          MESSAGE s999 WITH 'Wrong_asynchronous_parameters'.
        WHEN 13.
          MESSAGE s999 WITH 'Cant_enq_tbtco_entry'.
        WHEN 14.
          MESSAGE s999 WITH 'Jobcount_generation_error'.
      ENDCASE.
    I hope this helps,
    Regards
    Raju Chitale
    Edited by: Raju Chitale on Dec 22, 2008 5:38 AM

  • Running a batch file inside a jar

    HI all
    I created a jar file , in which i need to run a batch file , so i wrote a main class to execute the run the batch file , but when iam running the jar it is searching for the given batch file out side the jar.
    my code is some thing like below
         public static void main(String args[])
              try
                   Runtime rt=Runtime.getRuntime();
                   Process process=rt.exec("%DIRNAME%/start.bat");
       InputStreamReader reader =
                      new InputStreamReader ( process.getInputStream () );
                   BufferedReader buf_reader =
                       new BufferedReader (  reader );
                    String line;
                    while ((line = buf_reader.readLine ()) != null)
                                 System.out.println (line);
              catch (IOException e) {
                    System.out.println (e);
         }so please help me.. is it the problem in specifing the path...?
    are does it have any other method to read the stream functions ..
    thanks in advance
    sam

    I don't think this will work. You could not go to a command line and enter, "%DIRNAME%/start.bat" if start.bat was inside a jar - the CLI doesn't know how to read a batch file inside a jar.
    I think it would work to programmatically read the lines of start.bat (when it is inside the jar) into an array of Strings and use Runtime.exec with the array as the argument.
    It would also work to extract the start.bat file, then execute it using Runtime.exec.

Maybe you are looking for

  • How do I move mouselessly to next tune when editing Info?

    Often the CDDB gets it wrong with classical CDs and I frequently must edit the information in my library. For pieces, like symphonies, with multiple movements, I need to go into the Get Info screen (Apple-I) and edit the Name field. I usually will co

  • My pc sound level is very low on playback from dvd and most websites even though its at 100 percent

    the playback level on dvd and most video streams is very low.(youtube seems ok)This is my second pavillion g7 w/ windows 7 .The first had a defective fan but the sound level was ok and there was a graphic eq section for sound control with other outpu

  • Error in posting a goods issue

    Hi everyone, We're encountering an issue with posting. When trying to post a goods issue from a delivery via VL02N, an error message is displayed : "The document does not contain any item.". although it does contain items. Do you have an idea of why

  • Query Protocol error

    Hi, I encountered errors when I have the below code in my application. ResponseHolder rh = bipService.get("query://SELECT SI_ID FROM CMS_INFOOBJECTS", null); Error: ERROR: Malformed query protocol: SELECT SI_ID FROM CMS_INFOOBJECTS AxisFault faultCod

  • Get error 10240 in labview 6i Evaluation when I run my VI's from lv5.1

    I want to run my VI's - created in Labview 5.1 - in Labview 6i Eval.The device PCI 6024E is detected in MAX, but I get "Error-10240 occurred at AI Group Config Possible reasons:NI-DAQLV: The driver interface could not locate or open the driver". Ni-D