@rem @rem Licensed Materials - Property of IBM @rem @rem IBM Cognos Products: fmmd @rem @rem (C) Copyright IBM Corp. 2003, 2013 @rem @rem US Government Users Restricted Rights - Use, duplication or disclosure @rem restricted by GSA ADP Schedule Contract with IBM Corp. @rem @echo off rem this is a batch file used to upgrade a single log file or all log files under one directory if "%1" == "" goto ARGEMPTY if "%1" == "-h" goto HELP if not exist %1 goto FILENOTEXIST if not exist %1\nul goto ONEFILE for %%f in (%1\*.xml) do attrib -r %%f for %%f in (%1\*.xml) do copy %%f %%f.backup for %%f in (%1\*.xml) do testXSLT -XD -Q -IN %%f.backup -XSL UpgradeActionLog.xsl -OUT %%f goto PROMPT :ONEFILE copy %1 %1.backup del /F %1 testXSLT -XD -Q -IN %1.backup -XSL UpgradeActionLog.xsl -OUT %1 goto PROMPT :ARGEMPTY echo Usage: %0 [-h] [log_file_path / log_folder_path] goto THEEND :HELP echo Framework Manager Action Log Upgrade Utility echo Syntax: %0 [-h] log_folder_path / log_folder_path echo Switches: -h displays this help information echo Parameters: path to log files or directory only contains log files echo Examples: %0 myLog.xml or %0 myLogDir goto THEEND :FILENOTEXIST echo %1 doesn't exist, please choose another [log_file_path / log_folder_path] goto THEEND :PROMPT echo sucessfully upgrade log file(s) %1 :THEEND