1

We are trying to use GitHub for IBMi code , one of the problem that we are facing is to rename bulk files. We are trying to build a master branch with all IBMi related source files and have them renamed with appropriate type and attribute. Eg - TESTPGM1.RPGLE - Rename as TESTPGM1.MODULE.RPGLE TESTPGM2.RPGLE - Rename as TESTPGM.SRVPGM.RPGLE

Is there a quick way to rename all files using above format ? We have around ~25K files with a combination of PGM , MODULE, SRVPGM, PF, LF etc.

As of now we are pushing all these 25K files from RDi to Git using iProject , is there an option to rename bulk files directly in iProject before we push to GitHub ? We do see an option to rename in RDi but that is one file at a time.

Digvijay
  • 41
  • 2

1 Answers1

0

The IBM i RNM command would not allow bulk rename indeed.

I would rather push everything to GitHub, clone it in a different OS, just to do the rename:

for file in *.RPGLE ; do mv "$file" "$(basename $file RPGLE)MODULE.RPGLE"; done

Add, commit and push, then sync back in your original IBMi environment.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250