Running a batch File in AS400

679 Views Asked by At

Is there a way to run a batch file on my local as400 server from as400 command line as this batch file exists at a shared folder exists on my local as400 server.

batch file:

   cd  C:\D1
    for /R %%f in (*.xml) do (
         echo "%%f" 
         copy %%f  C:\backup
         move %%f  Z:\
          GOTO :Exit
    )
    
    :Exit
1

There are 1 best solutions below

0
On

Running Batch files like .bat or .cmd ia nor possible on the IBMi. But, you can run then on the PC when the batchfile is available on the IFS (or a IBMi share). If you realy need to run it on the IBMi, then you need to use the QSHELL (QSH) environment (Qshell is a command environment based on POSIX and X/Open standards). So you can run linux commands on it. But if I look to your example script, IBMi doesn't have a C: not Z: disk.