Can I use the old 100 amp, 20 circuit main panel as a juction box on a 200amp service upgrade where I will be changing the location of the panel?

I'm moving the panel 4 feet to get the needed working clearance. I'll strip out the guts of the panelboard.

I know I've seen this done before. I want to know if it is code compliant?

shortcircuit