Skip to content

Delete obsolete files

Script ifs_delete_obsolete_files.cmd/sh

The script ifs_delete_obsolete_files.cmd/sh is located in component fndbas/build folder, and will in a build home be located in the build folder.

The normal way to handle deleted files between releases is to create a new build_home. In pipelines it might be desirable to keep the old build_home even when upgrading to a new releases to have a uniform behavior on all deliveries. The ifs_delete_obsolete_files script can then be run as part of every delivery. The ifs_delete_obsolete_files will delete files given in a file list (generated by ifs_git_diff script). To ensure that moved or overtaken files are not deleted a comparison between the component structure(s) with the build_home will be made - this will prevent deleting all files in the given file list if the logic says it safer to keep the file.

The script accepts these arguments.

ParameterRequiredPurposeExamples/Defaults
--componentsMandatoryPath to the components. The components will be analyzed to prevent deletion of still existing file(s).--components "c:\work\components"
--custcomponentsOptionalPath to the customized components. Both components and custcomponents will be analyzed for still existing files.--custcomponents "c:\work\custcomponents"
--buildhomeMandatoryPath to the build home.--buildhome "c:\work\build_home"
--filelistnameMandatoryA list of deleted files generated from ifs_git_diff.cmd/sh script.--filelistname c:\work\difflist.txt
--logfileOptional - defaults to buildhome\delete-files.logLog file name--logfile c:\work\logs\logfile.log
--dryrunOptionalNo deletion will be executed, only logging--dryrun
--helpWill show list of arguments