Skip to Content
avatar image
Former Member

will .bat file run on UNIX OS

Hi,

I hv a query, - my organization's internal PI development system is on Windows, where as my client's PI system is on UNIX. I have written a batch file which i am invoking from the receiver channel in the organization's PI Dev Box.

My query is : - will the .bat file be invoked in the unix OS as well from the receiver channel or do i need to write a shell script?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 08, 2015 at 01:30 PM

    this is fixed. i have written a shell script and it works! - thanks guys!

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 16, 2015 at 11:43 AM

    I don't think you can execute windows cmd's on unix. So you might have to rewrite the functionality in shell script.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 16, 2015 at 05:46 PM

    What does your batch file do? Maybe you can make the functionality using a Java adapter Module so it is compatible across both systems.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 16, 2015 at 12:50 PM

    Hi Diptendu,

    I think you had better to ask in a linux forum. I have find thisRunning Windows Batch Files on Linux | Linux.org, you can check if the wine command  is installed in your linux platform. From my point of view, i would follow Hareesh suggestion and i would rewrite the batch files.

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 08, 2015 at 01:27 PM

    your .bat file will not run on UNIX. As the other users said you will need a shell script. But be aware that you don't have a shell when using a OS command in file adapter on UNIX.

    Under the hood you do a java exec().

    In my opinion its better to use a perl skript. You have perl on unix and its available for windows too, so your scripts are portabel between the systems.

    Writing a perl script for renaming some files took me some minutes, where as I couldn' t get the shell skript to work.

    Add comment
    10|10000 characters needed characters exceeded