Hello Experts,
I have an external system xml and i am able to apply xlst manually and it gives me a new xml as per maximo OS format. I want to automate this process through batch job. Below is the batch code which is not working ? can anyone guide what is wrong with the bat file?
@echo off
pause
set "sourceFolder=C:\Users\Aayansh\Desktop\AXML"
set "destinationFolder=C:\Users\Aayansh\Desktop\BXML"
set "xsltFile=C:\Users\Aayansh\Desktop\transform.xsl"
if not exist "%destinationFolder%" mkdir "%destinationFolder%"
for %%F in ("%sourceFolder%\*.xml") do (
set "inputFile=%%~fF"
set "outputFile=!destinationFolder!\%%~nF_output.xml"
call :applyXslt
)
echo Done.
exit /b
:applyXslt
echo Applying XSLT mapping to !inputFile!...
@echo off
msxsl "!inputFile!" "!xsltFile!" -o "!outputFile!" >nul 2>&1
if errorlevel 1 (
echo Error applying XSLT mapping to !inputFile!
) else (
echo XSLT mapping applied successfully. Output saved to !outputFile!
)
goto :eof
#EverythingMaximo#Integrations#MaximoUserGroups------------------------------
Pradeep Rout
TCSL
------------------------------